| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | 6 | private function findClassName(string $class) |
|
| 68 | { |
||
| 69 | 6 | $name = $this->getClassName($class); |
|
| 70 | 6 | if ($name !== null) { |
|
| 71 | 6 | return $name; |
|
| 72 | } |
||
| 73 | |||
| 74 | 6 | foreach ($this->pattern as $pattern => $name) { |
|
| 75 | 2 | if (preg_match($pattern, $class) === 1) { |
|
| 76 | 2 | return $this->getClassName($name); |
|
| 77 | } |
||
| 78 | } |
||
| 79 | |||
| 80 | 6 | return null; |
|
| 81 | } |
||
| 82 | |||
| 95 | } |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.