| @@ 1424-1428 (lines=5) @@ | ||
| 1421 | foreach ($rawComponents as $c) { |
|
| 1422 | $c = $this->reduce($c); |
|
| 1423 | if ($i < 4) { |
|
| 1424 | if ($c[0] == "number" && $c[2] == "%") { |
|
| 1425 | $components[] = 255 * ($c[1] / 100); |
|
| 1426 | } else { |
|
| 1427 | $components[] = floatval($c[1]); |
|
| 1428 | } |
|
| 1429 | } elseif ($i == 4) { |
|
| 1430 | if ($c[0] == "number" && $c[2] == "%") { |
|
| 1431 | $components[] = 1.0 * ($c[1] / 100); |
|
| @@ 1429-1435 (lines=7) @@ | ||
| 1426 | } else { |
|
| 1427 | $components[] = floatval($c[1]); |
|
| 1428 | } |
|
| 1429 | } elseif ($i == 4) { |
|
| 1430 | if ($c[0] == "number" && $c[2] == "%") { |
|
| 1431 | $components[] = 1.0 * ($c[1] / 100); |
|
| 1432 | } else { |
|
| 1433 | $components[] = floatval($c[1]); |
|
| 1434 | } |
|
| 1435 | } else break; |
|
| 1436 | ||
| 1437 | $i++; |
|
| 1438 | } |
|