Code Duplication    Length = 5-7 lines in 2 locations

src/LesserPhp/Compiler.php 2 locations

@@ 1107-1111 (lines=5) @@
1104
            foreach ($rawComponents as $c) {
1105
                $c = $this->reduce($c);
1106
                if ($i < 4) {
1107
                    if ($c[0] === "number" && $c[2] === "%") {
1108
                        $components[] = 255 * ($c[1] / 100);
1109
                    } else {
1110
                        $components[] = (float)$c[1];
1111
                    }
1112
                } elseif ($i === 4) {
1113
                    if ($c[0] === "number" && $c[2] === "%") {
1114
                        $components[] = 1.0 * ($c[1] / 100);
@@ 1112-1118 (lines=7) @@
1109
                    } else {
1110
                        $components[] = (float)$c[1];
1111
                    }
1112
                } elseif ($i === 4) {
1113
                    if ($c[0] === "number" && $c[2] === "%") {
1114
                        $components[] = 1.0 * ($c[1] / 100);
1115
                    } else {
1116
                        $components[] = (float)$c[1];
1117
                    }
1118
                } else {
1119
                    break;
1120
                }
1121