Code Duplication    Length = 7-7 lines in 2 locations

system/libraries/drivers/Image.php 2 locations

@@ 60-66 (lines=7) @@
57
        $geometry['height'] = min($geometry['height'], $height);
58
59
        // Set standard coordinates if given, otherwise use pixel values
60
        if ($geometry['top'] === 'center') {
61
            $geometry['top'] = floor(($height / 2) - ($geometry['height'] / 2));
62
        } elseif ($geometry['top'] === 'top') {
63
            $geometry['top'] = 0;
64
        } elseif ($geometry['top'] === 'bottom') {
65
            $geometry['top'] = $height - $geometry['height'];
66
        }
67
68
        // Set standard coordinates if given, otherwise use pixel values
69
        if ($geometry['left'] === 'center') {
@@ 69-75 (lines=7) @@
66
        }
67
68
        // Set standard coordinates if given, otherwise use pixel values
69
        if ($geometry['left'] === 'center') {
70
            $geometry['left'] = floor(($width / 2) - ($geometry['width'] / 2));
71
        } elseif ($geometry['left'] === 'left') {
72
            $geometry['left'] = 0;
73
        } elseif ($geometry['left'] === 'right') {
74
            $geometry['left'] = $width - $geometry['height'];
75
        }
76
77
        // Restore error reporting
78
        error_reporting($reporting);