@@ -64,7 +64,7 @@ class Parser
6464 private $ buffer ;
6565 private $ utf8 ;
6666 private $ encoding ;
67- private $ pattern_modifiers = 'Ais ' ;
67+ private $ patternModifiers = 'Ais ' ;
6868
6969
7070 /**
@@ -84,7 +84,7 @@ public function __construct($sourceName, $sourceIndex = 0, $encoding = 'utf-8')
8484 $ this ->utf8 = ! $ encoding || strtolower ($ encoding ) === 'utf-8 ' ;
8585
8686 if ($ this ->utf8 ) {
87- $ this ->pattern_modifiers = 'Aisu ' ;
87+ $ this ->patternModifiers = 'Aisu ' ;
8888 }
8989
9090 if (empty (self ::$ operatorPattern )) {
@@ -788,7 +788,7 @@ protected function peek($regex, &$out, $from = null)
788788 $ from = $ this ->count ;
789789 }
790790
791- $ r = '/ ' . $ regex . '/ ' .$ this ->pattern_modifiers ;
791+ $ r = '/ ' . $ regex . '/ ' .$ this ->patternModifiers ;
792792 $ result = preg_match ($ r , $ this ->buffer , $ out , null , $ from );
793793
794794 return $ result ;
@@ -868,7 +868,7 @@ protected function match($regex, &$out, $eatWhitespace = null)
868868 $ eatWhitespace = $ this ->eatWhiteDefault ;
869869 }
870870
871- $ r = '/ ' . $ regex . '/ ' .$ this ->pattern_modifiers ;
871+ $ r = '/ ' . $ regex . '/ ' .$ this ->patternModifiers ;
872872
873873 if (preg_match ($ r , $ this ->buffer , $ out , null , $ this ->count )) {
874874 $ this ->count += strlen ($ out [0 ]);
@@ -897,20 +897,21 @@ protected function literal($what, $eatWhitespace = null)
897897 $ eatWhitespace = $ this ->eatWhiteDefault ;
898898 }
899899
900-
901900 $ len = strlen ($ what );
902- if ( substr ($ this ->buffer ,$ this ->count ,$ len ) === $ what ){
901+
902+ if (substr ($ this ->buffer , $ this ->count , $ len ) === $ what ) {
903903 $ this ->count += $ len ;
904+
904905 if ($ eatWhitespace ) {
905906 $ this ->whitespace ();
906907 }
908+
907909 return true ;
908910 }
909911
910912 return false ;
911913 }
912914
913-
914915 /**
915916 * Match some whitespace
916917 *
0 commit comments