Skip to content

Commit 596e1fa

Browse files
[Yaml] CS
1 parent 329911d commit 596e1fa

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

Parser.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
257257
return $value;
258258
}
259259

260-
throw new ParseException('Unable to parse', $this->getRealCurrentLineNb() + 1, $this->currentLine);
260+
throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
261261
}
262262
}
263263

@@ -636,10 +636,7 @@ private function isNextLineIndented()
636636
return false;
637637
}
638638

639-
$ret = false;
640-
if ($this->getCurrentLineIndentation() > $currentIndentation) {
641-
$ret = true;
642-
}
639+
$ret = $this->getCurrentLineIndentation() > $currentIndentation;
643640

644641
$this->moveToPreviousLine();
645642

@@ -740,14 +737,7 @@ private function isNextLineUnIndentedCollection()
740737
return false;
741738
}
742739

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();
751741

752742
$this->moveToPreviousLine();
753743

@@ -789,8 +779,7 @@ private function isBlockScalarHeader()
789779
*/
790780
public static function preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
791781
{
792-
$ret = preg_match($pattern, $subject, $matches, $flags, $offset);
793-
if ($ret === false) {
782+
if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
794783
switch (preg_last_error()) {
795784
case PREG_INTERNAL_ERROR:
796785
$error = 'Internal PCRE error.';

0 commit comments

Comments
 (0)