minor #16691 [DI] remove useless condition around unset (Tobion)
This PR was merged into the 2.3 branch.
Discussion
----------
[DI] remove useless condition around unset
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
478375d
[DI] remove useless condition around unset
This commit is contained in:
commit
fd140fc045
|
@ -312,10 +312,7 @@ class Container implements IntrospectableContainerInterface
|
|||
$service = $this->$method();
|
||||
} catch (\Exception $e) {
|
||||
unset($this->loading[$id]);
|
||||
|
||||
if (array_key_exists($id, $this->services)) {
|
||||
unset($this->services[$id]);
|
||||
}
|
||||
unset($this->services[$id]);
|
||||
|
||||
if ($e instanceof InactiveScopeException && self::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
|
||||
return;
|
||||
|
|
|
@ -409,9 +409,7 @@ class Definition
|
|||
*/
|
||||
public function clearTag($name)
|
||||
{
|
||||
if (isset($this->tags[$name])) {
|
||||
unset($this->tags[$name]);
|
||||
}
|
||||
unset($this->tags[$name]);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
Reference in New Issue