| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 15 | public function fullyQualifiedNameFor(Name $name): string |
||
| 16 | { |
||
| 17 | foreach ($this->useStatements as $useStatement) { |
||
| 18 | if ($useStatement->endsWith($name)) { |
||
| 19 | return $useStatement->fullyQualifiedName($name); |
||
| 20 | } |
||
| 21 | if ($useStatement->includes($name)) { |
||
| 22 | return $useStatement->merge($name); |
||
| 23 | } |
||
| 24 | if ($useStatement->isAliasedAs($name)) { |
||
| 25 | return $useStatement->fullyQualifiedName($name); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | return $name->fullName(); |
||
| 29 | } |
||
| 31 |