| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function setValue($object, $value) |
||
| 29 | { |
||
| 30 | $set = 'set'.ucfirst($this->property); |
||
| 31 | if (!method_exists($object, $set)) { |
||
| 32 | throw new \RuntimeException( |
||
| 33 | sprintf('Missing method to set property %s on class %s', $this->property, get_class($object)) |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $object->$set($value); |
||
| 38 | } |
||
| 39 | |||
| 70 |