| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function getConstructorName(ReflectionClass $class): Name |
||
| 18 | { |
||
| 19 | $constructor = $class->getConstructor(); |
||
| 20 | if (! $constructor) { |
||
|
|
|||
| 21 | return new Name(Name::ANY); |
||
| 22 | } |
||
| 23 | |||
| 24 | $reflMethod = new \ReflectionMethod($class->getName(), '__construct'); |
||
| 25 | $name = Name::withAttributes($reflMethod); |
||
| 26 | if ($name) { |
||
| 27 | return $name; |
||
| 28 | } |
||
| 29 | |||
| 30 | return new Name(Name::ANY); |
||
| 31 | } |
||
| 59 |