| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 17 | public function hasInstance(string $alias): bool |
|
| 33 | { |
||
| 34 | 17 | $parent = $this->scope->getParent(); |
|
| 35 | 17 | if ($parent !== null && $parent->hasInstance($alias)) { |
|
| 36 | 3 | return true; |
|
| 37 | } |
||
| 38 | |||
| 39 | 17 | if (!$this->container->has($alias)) { |
|
| 40 | 3 | return false; |
|
| 41 | } |
||
| 42 | |||
| 43 | 16 | return parent::hasInstance($alias); |
|
| 44 | } |
||
| 56 |