Skip to content

Commit 6dff4ec

Browse files
committed
Merge branch '2.7'
* 2.7: (22 commits) Php Inspections (EA Extended): squash all PR-13813 commits replaced the last remaining is_integer() call [2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup [FrameworkBundle] simplify dep declaration [VarDumper] Fix "next element is already occupied" [Serializer] Introduce ObjectNormalizer [Serializer] Refactoring of metadata [Validator] Added missing galician (gl) translations [WebProfilerBundle] Update ajax calls in toolbar to add the css error class [PropertyAccess] stop overwriting once a reference is reached (3rd) [OptionsResolver] Remove Unused Variable from Foreach Cycles [travis] Tests Security sub-components [Serializer] Test that normalizers ignore non-existing attributes. [Twig] bootstrap_3_layout.html.twig is usable as a trait [travis] Tests Security sub-components [Serializer] Fix ClassMetadataFactory PHPDoc CS fixes [Serializer] rename exception interface [Serializer] Optimize GetSetMethodNormalizer and PropertyNormalizer [TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty ... Conflicts: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php src/Symfony/Component/Serializer/composer.json
2 parents d5f93bf + dc24c18 commit 6dff4ec

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

OptionsResolver.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function setRequired($optionNames)
258258
throw new AccessException('Options cannot be made required from a lazy option or normalizer.');
259259
}
260260

261-
foreach ((array) $optionNames as $key => $option) {
261+
foreach ((array) $optionNames as $option) {
262262
$this->defined[$option] = true;
263263
$this->required[$option] = true;
264264
}
@@ -339,7 +339,7 @@ public function setDefined($optionNames)
339339
throw new AccessException('Options cannot be defined from a lazy option or normalizer.');
340340
}
341341

342-
foreach ((array) $optionNames as $key => $option) {
342+
foreach ((array) $optionNames as $option) {
343343
$this->defined[$option] = true;
344344
}
345345

@@ -617,14 +617,8 @@ public function remove($optionNames)
617617
}
618618

619619
foreach ((array) $optionNames as $option) {
620-
unset($this->defined[$option]);
621-
unset($this->defaults[$option]);
622-
unset($this->required[$option]);
623-
unset($this->resolved[$option]);
624-
unset($this->lazy[$option]);
625-
unset($this->normalizers[$option]);
626-
unset($this->allowedTypes[$option]);
627-
unset($this->allowedValues[$option]);
620+
unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]);
621+
unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option]);
628622
}
629623

630624
return $this;

0 commit comments

Comments
 (0)