| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | public function __construct($object) { |
||
| 6 | if ($object instanceof \stdclass) { |
||
| 7 | $this->closure = function ($field, $value) use ($object) { $object->$field = $value; }; |
||
| 8 | } |
||
| 9 | else { |
||
| 10 | $this->closure = function ($field, $value) { $this->$field = $value; }; |
||
| 11 | $this->closure = $this->closure->bindTo($object, $object); |
||
| 12 | } |
||
| 27 | } |