[DI] remove useless condition around unset

This commit is contained in:
Tobias Schultze 2015-11-26 18:53:25 +01:00
parent 5f93188dc0
commit 478375d664
2 changed files with 2 additions and 7 deletions

View File

@ -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;

View File

@ -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;
}