| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 12 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 16 | 50 | public function __invoke($object, string $property): \ReflectionProperty  | 
            |
| 17 |     { | 
            ||
| 18 | 50 |         if (!is_object($object)) { | 
            |
| 19 | 2 | throw new InvalidArgumentException;  | 
            |
| 20 | }  | 
            ||
| 21 | |||
| 22 |         try { | 
            ||
| 23 | 48 | return $this->byObject($object, $property);  | 
            |
| 24 | 24 |         } catch (PropertyNotFoundException $e) { | 
            |
| 25 | 24 | return $this->byClass(get_class($object), $property);  | 
            |
| 26 | }  | 
            ||
| 27 | }  | 
            ||
| 28 | |||
| 58 |