| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function __invoke($object) : string |
||
| 12 | { |
||
| 13 | if (! $object instanceof WeavedInterface) { |
||
| 14 | return get_class($object); |
||
| 15 | } |
||
| 16 | |||
| 17 | $class = new \ReflectionClass($object); |
||
| 18 | if (! $class instanceof \ReflectionClass) { |
||
| 19 | throw new \ReflectionException; |
||
| 20 | } |
||
| 21 | $parent = $class->getParentClass(); |
||
| 22 | if (! $parent instanceof \ReflectionClass) { |
||
| 23 | throw new \ReflectionException; |
||
| 24 | } |
||
| 25 | |||
| 26 | return (string) $parent->getFileName(); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |