fix exclude from phpcs

This commit is contained in:
Frédéric FRANCE 2019-03-02 10:00:51 +01:00
parent 1cb3bad7f8
commit 40d34940f1
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
11 changed files with 102 additions and 106 deletions

View File

@ -309,7 +309,7 @@ script:
set -e set -e
# Exclusions are defined in the ruleset.xml file # Exclusions are defined in the ruleset.xml file
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
phpcs -s -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .
set +e set +e
echo echo

View File

@ -11,8 +11,6 @@
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern> <exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
<exclude-pattern type="relative">*/nltechno*</exclude-pattern> <exclude-pattern type="relative">*/nltechno*</exclude-pattern>
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern> <exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">*.min.css</exclude-pattern>
<exclude-pattern type="relative">*.js</exclude-pattern>
<!-- List of all tests --> <!-- List of all tests -->

View File

@ -159,4 +159,3 @@ print '
} }
}); });
});'."\n"; });'."\n";

View File

@ -287,8 +287,7 @@ function dol_json_decode($json, $assoc=false)
*/ */
function _unval($val) function _unval($val)
{ {
while (preg_match('/\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg)) while (preg_match('/\\\u([0-9A-F]{2})([0-9A-F]{2})/i', $val, $reg)) {
{
// single, escaped unicode character // single, escaped unicode character
$utf16 = chr(hexdec($reg[1])) . chr(hexdec($reg[2])); $utf16 = chr(hexdec($reg[1])) . chr(hexdec($reg[2]));
$utf8 = utf162utf8($utf16); $utf8 = utf162utf8($utf16);