| Total Complexity | 7 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 11 | final class Name implements Stringable |
||
| 12 | { |
||
| 13 | /** @var string[] */ |
||
| 14 | private readonly array $parts; |
||
| 15 | |||
| 16 | 215 | public function __construct(string $name) |
|
| 17 | { |
||
| 18 | 215 | Assert::notEmpty(trim($name), 'Definition name cannot be null or empty'); |
|
| 19 | 214 | $this->parts = explode('\\', trim($name)); |
|
| 20 | } |
||
| 21 | |||
| 22 | 25 | public function first(): string |
|
| 23 | { |
||
| 24 | 25 | return $this->parts[0]; |
|
| 25 | } |
||
| 26 | |||
| 27 | 139 | public function fullName(): string |
|
| 28 | { |
||
| 29 | 139 | return implode('\\', $this->parts); |
|
| 30 | } |
||
| 31 | |||
| 32 | 29 | public function isArray(): bool |
|
| 33 | { |
||
| 34 | 29 | return str_ends_with((string) $this, '[]'); |
|
| 35 | } |
||
| 36 | |||
| 37 | 34 | public function removeArraySuffix(): string |
|
| 38 | { |
||
| 39 | 34 | return str_replace(search: '[]', replace: '', subject: $this->fullName()); |
|
| 40 | } |
||
| 41 | |||
| 42 | 132 | public function __toString(): string |
|
| 43 | { |
||
| 44 | 132 | return $this->parts[count($this->parts) - 1]; |
|
| 45 | } |
||
| 46 | |||
| 47 | 2 | public function packageName(): string |
|
| 51 | } |
||
| 52 | } |
||
| 53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths