Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
53 | 6 | private function findClassName(string $class) |
|
54 | { |
||
55 | 6 | $name = $this->getClassName($class); |
|
56 | 6 | if ($name !== null) { |
|
57 | 6 | return $name; |
|
58 | } |
||
59 | |||
60 | 6 | foreach ($this->pattern as $pattern => $name) { |
|
61 | 2 | if (preg_match($pattern, $class) === 1) { |
|
62 | 2 | return $this->getClassName($name); |
|
63 | } |
||
64 | } |
||
65 | |||
66 | 6 | return null; |
|
67 | } |
||
68 | |||
104 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.