@@ -39,7 +39,7 @@ public function translatePatternFromGlob($path)
39
39
protected function translateGroupsFromGlob ($ pattern )
40
40
{
41
41
preg_match_all ('~ \\\\\\{[^, \\}]+(?:,[^, \\}]*)* \\\\\\}~ ' , $ pattern , $ matches , PREG_OFFSET_CAPTURE );
42
- for ($ index = count ($ matches [0 ]) - 1 ; $ index >= 0 ; -- $ index ) {
42
+ for ($ index = count ($ matches [0 ]) - 1 ; $ index >= 0 ; $ index -= 1 ) {
43
43
list ($ match , $ offset ) = $ matches [0 ][$ index ];
44
44
$ replacement = substr_replace ($ match , '(?: ' , 0 , 2 );
45
45
$ replacement = substr_replace ($ replacement , ') ' , -2 );
@@ -65,9 +65,9 @@ protected function translateGroupsFromGlob($pattern)
65
65
protected function translateCharacterGroupsFromGlob ($ pattern )
66
66
{
67
67
preg_match_all ('~ \\\\\\[( \\\\\\!)?[^ \\]]+ \\\\\\]~i ' , $ pattern , $ matches , PREG_OFFSET_CAPTURE );
68
- for ($ index = count ($ matches [0 ]) - 1 ; $ index >= 0 ; -- $ index ) {
68
+ for ($ index = count ($ matches [0 ]) - 1 ; $ index >= 0 ; $ index -= 1 ) {
69
69
list ($ match , $ offset ) = $ matches [0 ][$ index ];
70
- $ exclude = !empty ($ matches [1 ][$ index ][ 0 ] );
70
+ $ exclude = !empty ($ matches [1 ][$ index ]);
71
71
$ replacement = substr_replace ($ match , '[ ' . ($ exclude ? '^ ' : '' ), 0 , $ exclude ? 4 : 2 );
72
72
$ replacement = substr_replace ($ replacement , '] ' , -2 );
73
73
$ replacement = str_replace ('\\- ' , '- ' , $ replacement );
0 commit comments