@@ 1418-1422 (lines=5) @@ | ||
1415 | foreach ($rawComponents as $c) { |
|
1416 | $c = $this->reduce($c); |
|
1417 | if ($i < 4) { |
|
1418 | if ($c[0] == "number" && $c[2] == "%") { |
|
1419 | $components[] = 255 * ($c[1] / 100); |
|
1420 | } else { |
|
1421 | $components[] = (float) $c[1]; |
|
1422 | } |
|
1423 | } elseif ($i == 4) { |
|
1424 | if ($c[0] == "number" && $c[2] == "%") { |
|
1425 | $components[] = 1.0 * ($c[1] / 100); |
|
@@ 1423-1429 (lines=7) @@ | ||
1420 | } else { |
|
1421 | $components[] = (float) $c[1]; |
|
1422 | } |
|
1423 | } elseif ($i == 4) { |
|
1424 | if ($c[0] == "number" && $c[2] == "%") { |
|
1425 | $components[] = 1.0 * ($c[1] / 100); |
|
1426 | } else { |
|
1427 | $components[] = (float) $c[1]; |
|
1428 | } |
|
1429 | } else break; |
|
1430 | ||
1431 | $i++; |
|
1432 | } |