Skip to content

Commit dc24c18

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: 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" [Validator] Added missing galician (gl) translations [PropertyAccess] stop overwriting once a reference is reached (3rd) [OptionsResolver] Remove Unused Variable from Foreach Cycles [travis] Tests Security sub-components [Twig] bootstrap_3_layout.html.twig is usable as a trait [travis] Tests Security sub-components CS fixes [TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty [travis] test with php nightly Conflicts: .travis.yml src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Component/Security/Http/Tests/Firewall/ExceptionListenerTest.php src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php
2 parents 510c096 + 4e040a9 commit dc24c18

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

@@ -686,14 +686,8 @@ public function remove($optionNames)
686686
}
687687

688688
foreach ((array) $optionNames as $option) {
689-
unset($this->defined[$option]);
690-
unset($this->defaults[$option]);
691-
unset($this->required[$option]);
692-
unset($this->resolved[$option]);
693-
unset($this->lazy[$option]);
694-
unset($this->normalizers[$option]);
695-
unset($this->allowedTypes[$option]);
696-
unset($this->allowedValues[$option]);
689+
unset($this->defined[$option], $this->defaults[$option], $this->required[$option], $this->resolved[$option]);
690+
unset($this->lazy[$option], $this->normalizers[$option], $this->allowedTypes[$option], $this->allowedValues[$option]);
697691
}
698692

699693
return $this;

0 commit comments

Comments
 (0)