| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 49 | protected function setConfig(array $config) |
||
| 50 | { |
||
| 51 | foreach ($config as $key => $value) { |
||
| 52 | $setter = 'set' . ucfirst($key); |
||
| 53 | |||
| 54 | if (method_exists($this, $setter)) { |
||
| 55 | $this->$setter($value); |
||
| 56 | } elseif (property_exists($this, $key)) { |
||
| 57 | $this->$key = $value; |
||
| 58 | } |
||
| 59 | } |
||
| 60 | |||
| 61 | $this->config = $config; |
||
| 62 | |||
| 63 | return $this; |
||
| 64 | } |
||
| 66 |