Code Duplication    Length = 3-3 lines in 2 locations

src/CImage/CAsciiArt.php 2 locations

@@ 179-181 (lines=3) @@
176
    public function getLuminance($red, $green, $blue)
177
    {
178
        switch ($this->luminanceStrategy) {
179
            case 1:
180
                $luminance = ($red * 0.2126 + $green * 0.7152 + $blue * 0.0722) / 255;
181
                break;
182
            case 2:
183
                $luminance = ($red * 0.299 + $green * 0.587 + $blue * 0.114) / 255;
184
                break;
@@ 182-184 (lines=3) @@
179
            case 1:
180
                $luminance = ($red * 0.2126 + $green * 0.7152 + $blue * 0.0722) / 255;
181
                break;
182
            case 2:
183
                $luminance = ($red * 0.299 + $green * 0.587 + $blue * 0.114) / 255;
184
                break;
185
            case 3:
186
                $luminance = sqrt(0.299 * pow($red, 2) + 0.587 * pow($green, 2) + 0.114 * pow($blue, 2)) / 255;
187
                break;