| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 8 | public function getConditions(ReflectionClass $class): array |
|
| 28 | { |
||
| 29 | 8 | $annotations = []; |
|
| 30 | 8 | $parents = []; |
|
| 31 | |||
| 32 | 8 | $this->getParentClasses($class, $parents); |
|
| 33 | 8 | $this->getInterfaces($class, $parents); |
|
| 34 | |||
| 35 | 8 | foreach ($parents as $parent) { |
|
| 36 | 6 | $annotations[] = $this->annotationReader->getClassAnnotations($parent); |
|
| 37 | } |
||
| 38 | |||
| 39 | 8 | if (\count($annotations)) { |
|
| 40 | 6 | $annotations = \array_merge(...$annotations); |
|
| 41 | } |
||
| 42 | |||
| 43 | 8 | return $this->filterContractAnnotation($annotations); |
|
| 44 | } |
||
| 45 | |||
| 68 |