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
1
2
/vendor
2
3
composer.lock
3
4
/phpunit /
5
+ # IDEs
4
6
.idea /
7
+ /nbproject /
Original file line number Diff line number Diff line change 1
1
language : php
2
2
php :
3
+ - ' 5.4'
4
+ - ' 5.5'
3
5
- ' 5.6'
4
6
- ' 7.0'
7
+ - ' 7.1'
8
+ - ' 7.2'
5
9
- hhvm
6
10
- 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
7
18
before_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
8
23
- composer install
9
24
script :
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 4
4
"type" : " project" ,
5
5
"description" : " PHP Regular expressions made easy" ,
6
6
"require" : {
7
- "php" : " >=5.6 "
7
+ "php" : " >=5.3 "
8
8
},
9
9
"require-dev" : {
10
10
"phpunit/phpunit" : " * >=4" ,
Original file line number Diff line number Diff line change @@ -297,8 +297,9 @@ public function any($value)
297
297
* @return VerbalExpressions
298
298
* @throws \InvalidArgumentException
299
299
*/
300
- public function range (... $ args )
300
+ public function range ()
301
301
{
302
+ $ args = func_get_args ();
302
303
$ arg_num = count ($ args );
303
304
304
305
if ($ arg_num %2 != 0 ) {
@@ -483,8 +484,8 @@ public function test($value)
483
484
// php doesn't have g modifier so we remove it if it's there and call preg_match_all()
484
485
if (strpos ($ this ->modifiers , 'g ' ) !== false ) {
485
486
$ 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 );
488
489
}
489
490
490
491
return (bool ) preg_match ($ this ->getRegex (), $ value );
You can’t perform that action at this time.
0 commit comments