| Conditions | 5 |
| Paths | 6 |
| Total Lines | 21 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 1 | throw new \Exception("Initializing malformed ConfigPath: Path may not start with separator."); |
|
| 26 | } |
||
| 27 | 9 | $pathParts = explode(self::PATH_SEP, $path); |
|
| 28 | 9 | return new static(array_shift($pathParts), $pathParts); |
|
| 29 | } |
||
| 30 | |||
| 31 | 4 | public function getScope(): string |
|
| 32 | { |
||
| 33 | 4 | return $this->scope; |
|
| 34 | } |
||
| 35 | |||
| 36 | 4 | public function getParts(): array |
|
| 37 | { |
||
| 38 | 4 | return $this->parts; |
|
| 39 | } |
||
| 40 | |||
| 41 | 4 | public function hasParts(): bool |
|
| 42 | { |
||
| 43 | 4 | return !empty($this->parts); |
|
| 44 | } |
||
| 45 | |||
| 46 | 1 | public function getLength(): int |
|
| 67 |