Code Duplication    Length = 6-6 lines in 2 locations

class/ColorTools.php 2 locations

@@ 88-93 (lines=6) @@
85
        //     $t10[3] = $t10[3] + $increment;
86
87
        $min = 0;
88
        for ($h = 1; $h <= 3; ++$h) {
89
            $t10[$h] += $increment;
90
            if ($t10[$h] < $tMin[$h] && $min < ($tMin[$h] - $t10[$h])) {
91
                $min = ($tMin[$h] - $t10[$h]);
92
            }
93
        }
94
95
        // echo "{$colorHexa}-{$plancher}-{$plafond}<br>";
96
        // echo "{$min}-{$max}-{$increment}<br>";
@@ 141-146 (lines=6) @@
138
        //     $t10[3] = $t10[3] + $increment;
139
140
        $min = 0;
141
        for ($h = 1; $h <= 3; ++$h) {
142
            $t10[$h] += $increment;
143
            if ($t10[$h] > $tMax[$h] && $min < ($t10[$h] - $tMax[$h])) {
144
                $min = ($t10[$h] - $tMax[$h]);
145
            }
146
        }
147
148
        $t10[1] = static::bornerValeur($t10[1] - $min, $plancher, $plafond);
149
        $t10[2] = static::bornerValeur($t10[2] - $min, $plancher, $plafond);