@@ 1158-1162 (lines=5) @@ | ||
1155 | foreach ($rawComponents as $c) { |
|
1156 | $c = $this->reduce($c); |
|
1157 | if ($i < 4) { |
|
1158 | if ($c[0] === "number" && $c[2] === "%") { |
|
1159 | $components[] = 255 * ($c[1] / 100); |
|
1160 | } else { |
|
1161 | $components[] = (float)$c[1]; |
|
1162 | } |
|
1163 | } elseif ($i === 4) { |
|
1164 | if ($c[0] === "number" && $c[2] === "%") { |
|
1165 | $components[] = 1.0 * ($c[1] / 100); |
|
@@ 1163-1169 (lines=7) @@ | ||
1160 | } else { |
|
1161 | $components[] = (float)$c[1]; |
|
1162 | } |
|
1163 | } elseif ($i === 4) { |
|
1164 | if ($c[0] === "number" && $c[2] === "%") { |
|
1165 | $components[] = 1.0 * ($c[1] / 100); |
|
1166 | } else { |
|
1167 | $components[] = (float)$c[1]; |
|
1168 | } |
|
1169 | } else { |
|
1170 | break; |
|
1171 | } |
|
1172 |