| Conditions | 5 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 19 | public function getConditions(ReflectionClass $class, $methodName) |
|
| 26 | { |
||
| 27 | 19 | $annotations = []; |
|
| 28 | 19 | $parentMethods = []; |
|
| 29 | while ( |
||
| 30 | 19 | preg_match('/\@inheritdoc/i', $class->getMethod($methodName)->getDocComment()) |
|
| 31 | 19 | && ($class = $class->getParentClass()) |
|
| 32 | 19 | && $class->hasMethod($methodName) |
|
| 33 | ) { |
||
| 34 | 4 | $parentMethods[] = $class->getMethod($methodName); |
|
| 35 | } |
||
| 36 | |||
| 37 | 19 | foreach ($parentMethods as $parentMethod) { |
|
| 38 | 4 | $annotations = array_merge($annotations, $this->annotationReader->getMethodAnnotations($parentMethod)); |
|
| 39 | } |
||
| 40 | 19 | $contracts = $this->filterContractAnnotation($annotations); |
|
| 41 | |||
| 42 | 19 | return $contracts; |
|
| 43 | } |
||
| 44 | } |
||
| 45 |