Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 8 | public function match(ReflectionClass $reflectionClass): bool |
|
20 | { |
||
21 | 8 | if (empty($this->attributes)) { |
|
22 | 4 | return false; |
|
23 | } |
||
24 | |||
25 | 4 | $attributes = $reflectionClass->getAttributes(); |
|
26 | 4 | $attributeNames = array_map( |
|
27 | 4 | static fn(ReflectionAttribute $attribute) => $attribute->getName(), |
|
28 | 4 | $attributes |
|
29 | 4 | ); |
|
30 | |||
31 | 4 | return count(array_intersect($this->attributes, $attributeNames)) === count($this->attributes); |
|
32 | } |
||
34 |