| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | 3 | public function set($object, $value): void |
|
| 58 | { |
||
| 59 | 3 | if (null === $this->setter) { |
|
| 60 | $this->setter = Closure::bind(static function ($object, $value, string $propertyName) { |
||
| 61 | 3 | $object->{$propertyName} = $value; |
|
| 62 | 3 | }, null, $this->className); |
|
| 63 | } |
||
| 64 | |||
| 65 | 3 | $setter = $this->setter; |
|
| 66 | 3 | $setter($object, $value, $this->propertyName); |
|
| 67 | 3 | } |
|
| 69 |