Skip to content

Commit 57f1ce8

Browse files
Apply php-cs-fixer rule for array_key_exists()
1 parent ba11776 commit 57f1ce8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ private static function evaluateScalar($scalar, $flags, $references = [])
633633
throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename);
634634
}
635635

636-
if (!array_key_exists($value, $references)) {
636+
if (!\array_key_exists($value, $references)) {
637637
throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
638638
}
639639

Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ private function doParse($value, $flags)
289289
$allowOverwrite = true;
290290
if (isset($values['value'][0]) && '*' === $values['value'][0]) {
291291
$refName = substr(rtrim($values['value']), 1);
292-
if (!array_key_exists($refName, $this->refs)) {
292+
if (!\array_key_exists($refName, $this->refs)) {
293293
if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) {
294294
throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename);
295295
}
@@ -698,7 +698,7 @@ private function parseValue($value, $flags, $context)
698698
$value = substr($value, 1);
699699
}
700700

701-
if (!array_key_exists($value, $this->refs)) {
701+
if (!\array_key_exists($value, $this->refs)) {
702702
if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) {
703703
throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename);
704704
}

0 commit comments

Comments
 (0)