@@ -253,7 +253,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
253
253
return $ value ;
254
254
}
255
255
256
- throw new ParseException ('Unable to parse ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine );
256
+ throw new ParseException ('Unable to parse. ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine );
257
257
}
258
258
}
259
259
@@ -652,10 +652,7 @@ private function isNextLineIndented()
652
652
return false ;
653
653
}
654
654
655
- $ ret = false ;
656
- if ($ this ->getCurrentLineIndentation () > $ currentIndentation ) {
657
- $ ret = true ;
658
- }
655
+ $ ret = $ this ->getCurrentLineIndentation () > $ currentIndentation ;
659
656
660
657
$ this ->moveToPreviousLine ();
661
658
@@ -756,14 +753,7 @@ private function isNextLineUnIndentedCollection()
756
753
return false ;
757
754
}
758
755
759
- $ ret = false ;
760
- if (
761
- $ this ->getCurrentLineIndentation () == $ currentIndentation
762
- &&
763
- $ this ->isStringUnIndentedCollectionItem ()
764
- ) {
765
- $ ret = true ;
766
- }
756
+ $ ret = $ this ->getCurrentLineIndentation () === $ currentIndentation && $ this ->isStringUnIndentedCollectionItem ();
767
757
768
758
$ this ->moveToPreviousLine ();
769
759
@@ -805,8 +795,7 @@ private function isBlockScalarHeader()
805
795
*/
806
796
public static function preg_match ($ pattern , $ subject , &$ matches = null , $ flags = 0 , $ offset = 0 )
807
797
{
808
- $ ret = preg_match ($ pattern , $ subject , $ matches , $ flags , $ offset );
809
- if ($ ret === false ) {
798
+ if (false === $ ret = preg_match ($ pattern , $ subject , $ matches , $ flags , $ offset )) {
810
799
switch (preg_last_error ()) {
811
800
case PREG_INTERNAL_ERROR :
812
801
$ error = 'Internal PCRE error. ' ;
0 commit comments