File tree Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 1+ # General Ignores
12/vendor
23composer.lock
34/phpunit /
5+ # IDEs
46.idea /
7+ /nbproject /
Original file line number Diff line number Diff line change 11language : php
22php :
3+ - ' 5.4'
4+ - ' 5.5'
35 - ' 5.6'
46 - ' 7.0'
7+ - ' 7.1'
8+ - ' 7.2'
59 - hhvm
610 - nightly
11+ matrix :
12+ include :
13+ - php : " 5.3"
14+ dist : precise
15+ git :
16+ # there should rarely be a need to clone 50 deep, so this is just reducing build-time
17+ depth : 5
718before_script :
19+ # no need to provide coverage more than once and no need for the speedbump otherwise
20+ - if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]]; then phpenv config-rm xdebug.ini || true ; fi
21+ # no need to test formatting more than once and php_codesniffer does not work with older php
22+ - if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.6" ]]; then composer remove --dev squizlabs/php_codesniffer ; fi
823 - composer install
924script :
10- - composer check-style
11- - composer test
25+ # since it's disabled otherwise...
26+ - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer check-style ; fi
27+ - composer test
Original file line number Diff line number Diff line change 44 "type" : " project" ,
55 "description" : " PHP Regular expressions made easy" ,
66 "require" : {
7- "php" : " >=5.6 "
7+ "php" : " >=5.3 "
88 },
99 "require-dev" : {
1010 "phpunit/phpunit" : " * >=4" ,
Original file line number Diff line number Diff line change @@ -297,8 +297,9 @@ public function any($value)
297297 * @return VerbalExpressions
298298 * @throws \InvalidArgumentException
299299 */
300- public function range (... $ args )
300+ public function range ()
301301 {
302+ $ args = func_get_args ();
302303 $ arg_num = count ($ args );
303304
304305 if ($ arg_num %2 != 0 ) {
@@ -483,8 +484,8 @@ public function test($value)
483484 // php doesn't have g modifier so we remove it if it's there and call preg_match_all()
484485 if (strpos ($ this ->modifiers , 'g ' ) !== false ) {
485486 $ this ->modifiers = str_replace ('g ' , '' , $ this ->modifiers );
486-
487- return preg_match_all ($ this ->getRegex (), $ value );
487+ $ matches = array (); //because it's not optional in <5.4
488+ return preg_match_all ($ this ->getRegex (), $ value, $ matches );
488489 }
489490
490491 return (bool ) preg_match ($ this ->getRegex (), $ value );
You can’t perform that action at this time.
0 commit comments