| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.3332 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 1 | protected function getParentConstraints() |
|
| 49 | { |
||
| 50 | try { |
||
| 51 | 1 | if ($parentClass = $this->reflection->getDeclaringClass()->getParentClass()) { |
|
| 52 | 1 | $parentProperty = $parentClass->getProperty($this->reflection->getName()); |
|
| 53 | } |
||
| 54 | } catch (Throwable $exception) { |
||
| 55 | throw new ConstraintInheritanceException('There is no parent property to inherit from'); |
||
| 56 | } |
||
| 57 | |||
| 58 | 1 | return (new static($parentProperty, (new AnnotationResolver($parentProperty))->resolve()))->resolve(); |
|
|
|
|||
| 59 | } |
||
| 61 |