| @@ 1267-1271 (lines=5) @@ | ||
| 1264 | foreach ($rawComponents as $c) { |
|
| 1265 | $c = $this->reduce($c); |
|
| 1266 | if ($i < 4) { |
|
| 1267 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1268 | $components[] = 255 * ($c[1] / 100); |
|
| 1269 | } else { |
|
| 1270 | $components[] = (float) $c[1]; |
|
| 1271 | } |
|
| 1272 | } elseif ($i === 4) { |
|
| 1273 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1274 | $components[] = 1.0 * ($c[1] / 100); |
|
| @@ 1272-1278 (lines=7) @@ | ||
| 1269 | } else { |
|
| 1270 | $components[] = (float) $c[1]; |
|
| 1271 | } |
|
| 1272 | } elseif ($i === 4) { |
|
| 1273 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1274 | $components[] = 1.0 * ($c[1] / 100); |
|
| 1275 | } else { |
|
| 1276 | $components[] = (float) $c[1]; |
|
| 1277 | } |
|
| 1278 | } else { |
|
| 1279 | break; |
|
| 1280 | } |
|
| 1281 | ||