@@ -323,7 +323,7 @@ public function peek($length = null, $start = null)
323323 */
324324 public function match ($ pattern , $ modifiers = null , $ ignoredSuffixes = null )
325325 {
326- $ modifiers = $ modifiers ?: '' ;
326+ $ modifiers = ( string ) $ modifiers ;
327327 $ ignoredSuffixes = $ ignoredSuffixes ?: "\n" ;
328328 $ matches = null ;
329329 $ this ->lastMatchResult = null ;
@@ -572,7 +572,7 @@ public function peekQuote()
572572 */
573573 public function peekSpace ()
574574 {
575- return ctype_space ($ this ->peek ());
575+ return ctype_space (( string ) $ this ->peek ());
576576 }
577577
578578 /**
@@ -584,7 +584,7 @@ public function peekSpace()
584584 */
585585 public function peekDigit ()
586586 {
587- return ctype_digit ($ this ->peek ());
587+ return ctype_digit (( string ) $ this ->peek ());
588588 }
589589
590590 /**
@@ -596,7 +596,7 @@ public function peekDigit()
596596 */
597597 public function peekAlpha ()
598598 {
599- return ctype_alpha ($ this ->peek ());
599+ return ctype_alpha (( string ) $ this ->peek ());
600600 }
601601
602602 /**
@@ -608,7 +608,7 @@ public function peekAlpha()
608608 */
609609 public function peekAlphaNumeric ()
610610 {
611- return ctype_alnum ($ this ->peek ());
611+ return ctype_alnum (( string ) $ this ->peek ());
612612 }
613613
614614 /**
@@ -658,7 +658,7 @@ public function readIndentation()
658658 */
659659 public function readUntilNewLine ()
660660 {
661- return $ this ->readUntil ([$ this , 'peekNewLine ' ]);
661+ return ( string ) $ this ->readUntil ([$ this , 'peekNewLine ' ]);
662662 }
663663
664664 /**
0 commit comments