| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function __invoke($object, string $prop, $default = null) |
||
| 16 | { |
||
| 17 | try { |
||
| 18 | if ($object === null) { |
||
| 19 | return $default; |
||
| 20 | } |
||
| 21 | $refProp = (new \ReflectionProperty($object, $prop)); |
||
| 22 | } catch (\Exception $e) { |
||
| 23 | return $default; |
||
| 24 | } |
||
| 25 | $refProp->setAccessible(true); |
||
| 26 | |||
| 27 | return $refProp->getValue($object); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.