Code Duplication    Length = 8-9 lines in 2 locations

src/Elphin/IcoFileLoader/Ico.php 2 locations

@@ 447-455 (lines=9) @@
444
         * 8 bits: 1 byte per pixel [ COLOR INDEX ].
445
         **/
446
        $offset = 0;
447
        for ($i = $metadata['Height'] - 1; $i >= 0; --$i) {
448
            for ($j = 0; $j < $metadata['Width']; ++$j) {
449
                if ($maskBits[$offset] == 0) {
450
                    $color = ord($metadata['data'][$offset]);
451
                    imagesetpixel($im, $j, $i, $palette[$color]);
452
                }
453
                ++$offset;
454
            }
455
        }
456
    }
457
458
    private function buildPalette($metadata, $im)
@@ 519-526 (lines=8) @@
516
        }
517
518
        $offset = 0;
519
        for ($i = $metadata['Height'] - 1; $i >= 0; --$i) {
520
            for ($j = 0; $j < $metadata['Width']; ++$j) {
521
                if ($maskBits[$offset] == 0) {
522
                    imagesetpixel($im, $j, $i, $palette[$colorbits[$offset]]);
523
                }
524
                ++$offset;
525
            }
526
        }
527
    }
528
}
529