| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function palette($color, string $value = null) |
||
| 40 | { |
||
| 41 | if (is_array($color)) { |
||
| 42 | foreach ($color as $name => $code) { |
||
| 43 | $this->palette($name, $code); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 48 | |||
| 49 | if (!array_key_exists($color, $this->options)) { |
||
| 50 | throw new Exception("Unknown option {$color}"); |
||
| 51 | } |
||
| 52 | |||
| 53 | $this->palette[$color] = $value; |
||
| 54 | |||
| 55 | return $this; |
||
| 56 | } |
||
| 84 | } |