Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3185dc9

Browse filesBrowse files
[Yaml] CS
1 parent ab1d938 commit 3185dc9
Copy full SHA for 3185dc9

File tree

Expand file treeCollapse file tree

1 file changed

+4
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-15
lines changed

‎src/Symfony/Component/Yaml/Parser.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Parser.php
+4-15Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.