| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 2 | public function getDeclaringClass() : ReflectionClass |
|
| 29 | { |
||
| 30 | 2 | $parencClass = (new \ReflectionClass($this->object))->getParentClass(); |
|
| 31 | 2 | if (! $parencClass instanceof \ReflectionClass) { |
|
| 32 | throw new \LogicException; // @codeCoverageIgnore |
||
| 33 | } |
||
| 34 | 2 | $originalClass = $parencClass->name; |
|
| 35 | 2 | $class = new ReflectionClass($originalClass); |
|
| 36 | 2 | $class->setObject($this->object); |
|
| 37 | |||
| 38 | 2 | return $class; |
|
| 39 | } |
||
| 40 | |||
| 69 |