Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function __invoke($object, string $prop, $default = null) |
||
19 | { |
||
20 | try { |
||
21 | if ($object === null) { |
||
22 | return $default; |
||
23 | } |
||
24 | |||
25 | $refProp = (new ReflectionProperty($object, $prop)); |
||
26 | } catch (Throwable $e) { |
||
27 | return $default; |
||
28 | } |
||
29 | |||
30 | $refProp->setAccessible(true); |
||
31 | |||
32 | return $refProp->getValue($object); |
||
33 | } |
||
34 | } |
||
35 |
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.