Conditions | 6 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
48 | 1 | private function getMethodIdentifier(\ReflectionMethod $method): ?string |
|
49 | { |
||
50 | 1 | if (!$method->isPublic() || $method->isStatic()) { |
|
51 | 1 | return null; |
|
52 | } |
||
53 | |||
54 | 1 | if (preg_match('/^__[^_]/', $method->getName())) { |
|
55 | 1 | return null; |
|
56 | } |
||
57 | |||
58 | 1 | $type = $method->getReturnType(); |
|
59 | |||
60 | 1 | if (!$type instanceof \ReflectionType || $type->isBuiltin()) { |
|
61 | 1 | return null; |
|
62 | } |
||
63 | |||
64 | 1 | return $type->getName(); |
|
65 | } |
||
67 |