File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 10
10
11
11
cache :
12
12
directories :
13
- - vendor
13
+ - vendor
14
14
15
15
before_install :
16
16
- export XDEBUG="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
@@ -21,15 +21,11 @@ install:
21
21
- travis_retry composer update -a --no-interaction
22
22
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
23
23
24
- before_script :
25
- - if is_hhvm; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi
26
-
27
24
script :
28
- - is_hhvm || mv -v "$XDEBUG.disabled" "$XDEBUG"
29
- - vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text
30
- - is_hhvm || mv -v "$XDEBUG" "$XDEBUG.disabled"
31
25
- vendor/bin/phpcs --standard=PSR2 src tests
32
26
- vendor/bin/php-cs-fixer fix -v --dry-run --allow-risky=yes --using-cache=no
27
+ - if is_hhvm; then echo "xdebug.enable = On" >> /etc/hhvm/php.ini; else mv -v "$XDEBUG.disabled" "$XDEBUG"; fi
28
+ - vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text
33
29
34
30
after_script :
35
31
- is_hhvm || php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Original file line number Diff line number Diff line change @@ -414,12 +414,16 @@ private function getJsonErrorName($error)
414
414
$ matches = array_keys (get_defined_constants (), $ error , true );
415
415
$ prefix = 'JSON_ERROR_ ' ;
416
416
$ prefixLength = strlen ($ prefix );
417
+ $ name = 'UNKNOWN_ERROR ' ;
417
418
418
419
foreach ($ matches as $ match ) {
419
420
if (strncmp ($ match , $ prefix , $ prefixLength ) === 0 ) {
420
- return $ match ;
421
+ $ name = $ match ;
422
+ break ;
421
423
}
422
424
}
425
+
426
+ return $ name ;
423
427
}
424
428
425
429
/**
You can’t perform that action at this time.
0 commit comments