10000 Merge branch '2.7' into 2.8 · symfony/symfony@c80a0ae · GitHub
[go: up one dir, main page]

Skip to content

Commit c80a0ae

Browse files
Merge branch '2.7' into 2.8
* 2.7: [Yaml] CS
2 parents 5dd83ad + 3185dc9 commit c80a0ae

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/Symfony/Component/Yaml/Parser.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
253253
return $value;
254254
}
255255

256-
throw new ParseException('Unable to parse', $this->getRealCurrentLineNb() + 1, $this->currentLine);
256+
throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
257257
}
258258
}
259259

@@ -652,10 +652,7 @@ private function isNextLineIndented()
652652
return false;
653653
}
654654

655-
$ret = false;
656-
if ($this->getCurrentLineIndentation() > $currentIndentation) {
657-
$ret = true;
658-
}
655+
$ret = $this->getCurrentLineIndentation() > $currentIndentation;
659656

660657
$this->moveToPreviousLine();
661658

@@ -756,14 +753,7 @@ private function isNextLineUnIndentedCollection()
756753
return false;
757754
}
758755

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

768758
$this->moveToPreviousLine();
769759

@@ -805,8 +795,7 @@ private function isBlockScalarHeader()
805795
*/
806796
public static function preg_match($pattern, $subject, &$matches = null, $flags = 0, $offset = 0)
807797
{
808-
$ret = preg_match($pattern, $subject, $matches, $flags, $offset);
809-
if ($ret === false) {
798+
if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) {
810799
switch (preg_last_error()) {
811800
case PREG_INTERNAL_ERROR:
812801
$error = 'Internal PCRE error.';

0 commit comments

Comments
 (0)
0