@@ -276,7 +276,7 @@ public function peek($length = null, $start = null)
276276 $ this ->nextConsumeLength = null ;
277277
278278 if (!$ this ->hasLength ()) {
279- return null ;
279+ return ;
280280 }
281281
282282 $ length = $ length !== null ? $ length : 1 ;
@@ -453,7 +453,7 @@ public function readWhile($callback, $peekLength = null)
453453 }
454454
455455 if (!$ this ->hasLength ()) {
456- return null ;
456+ return ;
457457 }
458458
459459 if ($ peekLength === null ) {
@@ -637,7 +637,7 @@ public function peekIdentifier(array $allowedChars = null)
637637 public function readIndentation ()
638638 {
639639 if (!$ this ->peekIndentation ()) {
640- return null ;
640+ return ;
641641 }
642642
643643 return $ this ->readWhile ([$ this , 'peekIndentation ' ]);
@@ -661,7 +661,7 @@ public function readUntilNewLine()
661661 public function readSpaces ()
662662 {
663663 if (!$ this ->peekSpace ()) {
664- return null ;
664+ return ;
665665 }
666666
667667 return $ this ->readWhile ('ctype_space ' );
@@ -675,7 +675,7 @@ public function readSpaces()
675675 public function readDigits ()
676676 {
677677 if (!$ this ->peekDigit ()) {
678- return null ;
678+ return ;
679679 }
680680
681681 return $ this ->readWhile ('ctype_digit ' );
@@ -689,7 +689,7 @@ public function readDigits()
689689 public function readAlpha ()
690690 {
691691 if (!$ this ->peekAlpha ()) {
692- return null ;
692+ return ;
693693 }
694694
695695 return $ this ->readWhile ('ctype_alpha ' );
@@ -703,7 +703,7 @@ public function readAlpha()
703703 public function readAlphaNumeric ()
704704 {
705705 if (!$ this ->peekAlphaNumeric ()) {
706- return null ;
706+ return ;
707707 }
708708
709709 return $ this ->readWhile ('ctype_alnum ' );
@@ -723,12 +723,12 @@ public function readIdentifier($prefix = null, $allowedChars = null)
723723 {
724724 if ($ prefix ) {
725725 if ($ this ->peek (mb_strlen ($ prefix )) !== $ prefix ) {
726- return null ;
726+ return ;
727727 }
728728
729729 $ this ->consume ();
730730 } elseif (!$ this ->peekAlphaIdentifier ($ allowedChars )) {
731- return null ;
731+ return ;
732732 }
733733
734734 return $ this ->readWhile (function () use ($ allowedChars ) {
@@ -752,7 +752,7 @@ public function readIdentifier($prefix = null, $allowedChars = null)
752752 public function readString (array $ escapeSequences = null , $ raw = false )
753753 {
754754 if (!$ this ->peekQuote ()) {
755- return null ;
755+ return ;
756756 }
757757
758758 $ quoteStyle = $ this ->consume ();
@@ -815,7 +815,7 @@ public function readString(array $escapeSequences = null, $raw = false)
815815 public function readExpression (array $ breaks = null , array $ brackets = null )
816816 {
817817 if (!$ this ->hasLength ()) {
818- return null ;
818+ return ;
819819 }
820820
821821 $ breaks = $ breaks ?: [];
0 commit comments