Skip to content

Commit 926e3b7

Browse files
Apply php-cs-fixer rule for array_key_exists()
1 parent 0f1cbae commit 926e3b7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Debug/OptionsResolverIntrospector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(OptionsResolver $optionsResolver)
3232
throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option));
3333
}
3434

35-
if (!array_key_exists($option, $this->{$property})) {
35+
if (!\array_key_exists($option, $this->{$property})) {
3636
throw new NoConfigurationException($message);
3737
}
3838

OptionsResolver.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function setDefault($option, $value)
175175
// to resolve options with lazy closures, normalizers or validation
176176
// rules, none of which can exist for undefined options
177177
// If the option was resolved before, update the resolved value
178-
if (!isset($this->defined[$option]) || array_key_exists($option, $this->resolved)) {
178+
if (!isset($this->defined[$option]) || \array_key_exists($option, $this->resolved)) {
179179
$this->resolved[$option] = $value;
180180
}
181181

@@ -215,7 +215,7 @@ public function setDefaults(array $defaults)
215215
*/
216216
public function hasDefault($option)
217217
{
218-
return array_key_exists($option, $this->defaults);
218+
return \array_key_exists($option, $this->defaults);
219219
}
220220

221221
/**
@@ -280,7 +280,7 @@ public function getRequiredOptions()
280280
*/
281281
public function isMissing($option)
282282
{
283-
return isset($this->required[$option]) && !array_key_exists($option, $this->defaults);
283+
return isset($this->required[$option]) && !\array_key_exists($option, $this->defaults);
284284
}
285285

286286
/**
@@ -694,12 +694,12 @@ public function offsetGet($option)
694694
}
695695

696696
// Shortcut for resolved options
697-
if (array_key_exists($option, $this->resolved)) {
697+
if (\array_key_exists($option, $this->resolved)) {
698698
return $this->resolved[$option];
699699
}
700700

701701
// Check whether the option is set at all
702-
if (!array_key_exists($option, $this->defaults)) {
702+
if (!\array_key_exists($option, $this->defaults)) {
703703
if (!isset($this->defined[$option])) {
704704
throw new NoSuchOptionException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined))));
705705
}
@@ -908,7 +908,7 @@ public function offsetExists($option)
908908
throw new AccessException('Array access is only supported within closures of lazy options and normalizers.');
909909
}
910910

911-
return array_key_exists($option, $this->defaults);
911+
return \array_key_exists($option, $this->defaults);
912912
}
913913

914914
/**

0 commit comments

Comments
 (0)