| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function getNamespaceName(): Name |
||
| 38 | { |
||
| 39 | if (0 === count($this->nodes)) { |
||
| 40 | throw new InvalidArgumentException('No name can be given: no namespace found.'); |
||
| 41 | } |
||
| 42 | |||
| 43 | if (1 < count($this->nodes)) { |
||
| 44 | throw new InvalidArgumentException('No name can be given: more than one namespace found.'); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $this->nodes[0]->name; |
||
| 48 | } |
||
| 49 | |||
| 66 |