source = $source; } /** * Encode current source * * @throws EncoderException * @return string */ public function encode(): string { return implode('', array_map( fn(Color $color): string => $color->encode(), $this->source->getColors(), )); } }