Code Duplication    Length = 11-11 lines in 2 locations

src/Elphin/IcoFileLoader/GdRenderer.php 1 location

@@ 173-183 (lines=11) @@
170
        $maskpos = 0;
171
172
        for ($i = $img->height - 1; $i >= 0; --$i) {
173
            for ($j = 0; $j < $img->width; ++$j) {
174
                if ($maskBits[$maskpos] == 0) {
175
                    //translate BGR to RGB
176
                    $col = (ord($binary[$offset + 2]) << 16) |
177
                        (ord($binary[$offset + 1]) << 8) |
178
                        (ord($binary[$offset]));
179
                    imagesetpixel($gd, $j, $i, $col);
180
                }
181
                $offset += 3;
182
                $maskpos++;
183
            }
184
        }
185
    }
186

src/Elphin/IcoFileLoader/Ico.php 1 location

@@ 399-409 (lines=11) @@
396
        $binary = $metadata['data'];
397
398
        for ($i = $metadata['Height'] - 1; $i >= 0; --$i) {
399
            for ($j = 0; $j < $metadata['Width']; ++$j) {
400
                if ($maskBits[$bitoffset] == 0) {
401
                    //translate BGR to RGB
402
                    $col = (ord($binary[$offset + 2]) << 16) |
403
                        (ord($binary[$offset + 1]) << 8) |
404
                        (ord($binary[$offset]));
405
                    imagesetpixel($im, $j, $i, $col);
406
                }
407
                $offset += 3;
408
                ++$bitoffset;
409
            }
410
        }
411
    }
412