| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | protected function getConstructor(\ReflectionClass $class): ?\ReflectionMethod |
||
| 26 | { |
||
| 27 | if ($class->hasMethod(self::CONSTRUCTOR_NAME)) { |
||
| 28 | return $class->getMethod(self::CONSTRUCTOR_NAME); |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($constructor = $this->getTraitConstructors($class)) { |
||
| 32 | return $constructor; |
||
| 33 | } |
||
| 34 | |||
| 35 | if ($parent = $class->getParentClass()) { |
||
| 36 | return $this->getConstructor($parent); |
||
| 37 | } |
||
| 38 | |||
| 39 | return null; |
||
| 40 | } |
||
| 60 | } |