Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
62 | 3 | public function get($object) |
|
63 | { |
||
64 | 3 | if (null === $this->getter) { |
|
65 | $this->getter = Closure::bind(static function ($object, string $propertyName) { |
||
66 | 3 | return $object->{$propertyName}; |
|
67 | 3 | }, null, $this->className); |
|
68 | } |
||
69 | |||
70 | 3 | $getter = $this->getter; |
|
71 | |||
72 | 3 | return $getter($object, $this->propertyName); |
|
73 | } |
||
75 |