| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1.037 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 19 | public static function getTypeName(\ReflectionProperty|\ReflectionParameter $property): ?string |
|
| 24 | { |
||
| 25 | $type = $property->getType(); |
||
| 26 | |||
| 27 | $typeName = match (true) { |
||
| 28 | $type instanceof \ReflectionIntersectionType => throw InvalidPropertyTypeException::notSupported(\ReflectionIntersectionType::class), |
||
|
|
|||
| 29 | 19 | $type instanceof \ReflectionUnionType => throw InvalidPropertyTypeException::notSupported(\ReflectionUnionType::class), |
|
| 30 | 19 | $type instanceof \ReflectionNamedType => $type->getName(), |
|
| 31 | 19 | default => null, |
|
| 32 | 19 | }; |
|
| 33 | |||
| 34 | 19 | return StringHelper::removeNotWordCharacters($typeName ?? ''); |
|
| 35 | } |
||
| 37 |
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