| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 6 | public function has($id): bool |
|
| 38 | { |
||
| 39 | 6 | $name = new Name($id); |
|
| 40 | |||
| 41 | 6 | if (!$this->services->has($name)) { |
|
| 42 | 2 | return false; |
|
| 43 | } |
||
| 44 | |||
| 45 | $definition = $this |
||
| 46 | 5 | ->services |
|
| 47 | 5 | ->get($name); |
|
| 48 | |||
| 49 | 5 | if (!$definition->exposed()) { |
|
| 50 | 2 | return false; |
|
| 51 | } |
||
| 52 | |||
| 53 | 4 | return $definition->isExposedAs($name); |
|
| 54 | } |
||
| 56 |