| Conditions | 5 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 37 | protected function mergeSetters($class, &$setters, array $mergeSetters = []) |
||
| 38 | { |
||
| 39 | if (empty($mergeSetters)) { |
||
| 40 | return; |
||
| 41 | } |
||
| 42 | |||
| 43 | $setters = array_merge($setters, $mergeSetters); |
||
| 44 | foreach ($setters as $method => $value) { |
||
| 45 | if (!method_exists($class, $method)) { |
||
| 46 | throw Exception::setterMethodNotFound($class, $method); |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($value instanceof LazyInterface) { |
||
| 50 | $setters[$method] = $value(); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 | } |