Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 99e1f80

Browse files
fheinOcramius
authored andcommitted
Introduced $resolvedName to avoid overriding an exsiting variable.
Removed unreachable return false.
1 parent e1ee16e commit 99e1f80

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ServiceManager.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,8 @@ public function has($name)
266266
}
267267

268268
// Finally check aliases
269-
$name = $this->resolvedAliases[$name];
270-
return isset($this->services[$name]) || isset($this->factories[$name]);
271-
272-
return false;
269+
$resolvedName = $this->resolvedAliases[$name];
270+
return isset($this->services[$resolvedName]) || isset($this->factories[$resolvedName]);
273271
}
274272

275273
/**

0 commit comments

Comments
 (0)