@@ 103-110 (lines=8) @@ | ||
100 | * |
|
101 | * @throws InvalidColorException |
|
102 | */ |
|
103 | public function imageColors($colors = null) |
|
104 | { |
|
105 | if (isset($colors) && $this->colorsAreValid($colors)) { |
|
106 | $this->config[Options::IMAGE_COLORS] = $colors; |
|
107 | } |
|
108 | ||
109 | return $this->config[Options::IMAGE_COLORS]; |
|
110 | } |
|
111 | ||
112 | protected function colorsAreValid($colors): bool |
|
113 | { |
|
@@ 136-143 (lines=8) @@ | ||
133 | * |
|
134 | * @throws InvalidHueException |
|
135 | */ |
|
136 | public function imageHue($hue = null): int |
|
137 | { |
|
138 | if (isset($hue) && $this->isValidHue($hue)) { |
|
139 | $this->config[Options::IMAGE_HUE] = (int) $hue; |
|
140 | } |
|
141 | ||
142 | return $this->config[Options::IMAGE_HUE]; |
|
143 | } |
|
144 | ||
145 | protected function isValidHue($hue): bool |
|
146 | { |