@@ -258,7 +258,7 @@ public function setRequired($optionNames)
258
258
throw new AccessException ('Options cannot be made required from a lazy option or normalizer. ' );
259
259
}
260
260
261
- foreach ((array ) $ optionNames as $ key => $ option ) {
261
+ foreach ((array ) $ optionNames as $ option ) {
262
262
$ this ->defined [$ option ] = true ;
263
263
$ this ->required [$ option ] = true ;
264
264
}
@@ -339,7 +339,7 @@ public function setDefined($optionNames)
339
339
throw new AccessException ('Options cannot be defined from a lazy option or normalizer. ' );
340
340
}
341
341
342
- foreach ((array ) $ optionNames as $ key => $ option ) {
342
+ foreach ((array ) $ optionNames as $ option ) {
343
343
$ this ->defined [$ option ] = true ;
344
344
}
345
345
@@ -617,14 +617,8 @@ public function remove($optionNames)
617
617
}
618
618
619
619
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 ]);
628
622
}
629
623
630
624
return $ this ;
0 commit comments