@@ -257,7 +257,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
257
257
return $ value ;
258
258
}
259
259
260
- throw new ParseException ('Unable to parse ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine );
260
+ throw new ParseException ('Unable to parse. ' , $ this ->getRealCurrentLineNb () + 1 , $ this ->currentLine );
261
261
}
262
262
}
263
263
@@ -636,10 +636,7 @@ private function isNextLineIndented()
636
636
return false ;
637
637
}
638
638
639
- $ ret = false ;
640
- if ($ this ->getCurrentLineIndentation () > $ currentIndentation ) {
641
- $ ret = true ;
642
- }
639
+ $ ret = $ this ->getCurrentLineIndentation () > $ currentIndentation ;
643
640
644
641
$ this ->moveToPreviousLine ();
645
642
@@ -740,14 +737,7 @@ private function isNextLineUnIndentedCollection()
740
737
return false ;
741
738
}
742
739
743
- $ ret = false ;
744
- if (
745
- $ this ->getCurrentLineIndentation () == $ currentIndentation
746
- &&
747
- $ this ->isStringUnIndentedCollectionItem ()
748
- ) {
749
- $ ret = true ;
750
- }
740
+ $ ret = $ this ->getCurrentLineIndentation () === $ currentIndentation && $ this ->isStringUnIndentedCollectionItem ();
751
741
752
742
$ this ->moveToPreviousLine ();
753
743
@@ -789,8 +779,7 @@ private function isBlockScalarHeader()
789
779
*/
790
780
public static function preg_match ($ pattern , $ subject , &$ matches = null , $ flags = 0 , $ offset = 0 )
791
781
{
792
- $ ret = preg_match ($ pattern , $ subject , $ matches , $ flags , $ offset );
793
- if ($ ret === false ) {
782
+ if (false === $ ret = preg_match ($ pattern , $ subject , $ matches , $ flags , $ offset )) {
794
783
switch (preg_last_error ()) {
795
784
case PREG_INTERNAL_ERROR :
796
785
$ error = 'Internal PCRE error. ' ;
0 commit comments