| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | protected function setConfig(array $config) |
||
| 68 | { |
||
| 69 | foreach ($config as $key => $value) { |
||
| 70 | $setter = 'set' . ucfirst($key); |
||
| 71 | if (method_exists($this, $setter)) { |
||
| 72 | $this->$setter($value); |
||
| 73 | } elseif (property_exists($this, $key)) { |
||
| 74 | $this->$key = $value; |
||
| 75 | } |
||
| 76 | } |
||
| 77 | |||
| 78 | $this->config = $config; |
||
| 79 | |||
| 80 | return $this; |
||
| 81 | } |
||
| 83 |