@@ 1391-1395 (lines=5) @@ | ||
1388 | foreach ($rawComponents as $c) { |
|
1389 | $c = $this->reduce($c); |
|
1390 | if ($i < 4) { |
|
1391 | if ($c[0] == "number" && $c[2] == "%") { |
|
1392 | $components[] = 255 * ($c[1] / 100); |
|
1393 | } else { |
|
1394 | $components[] = floatval($c[1]); |
|
1395 | } |
|
1396 | } elseif ($i == 4) { |
|
1397 | if ($c[0] == "number" && $c[2] == "%") { |
|
1398 | $components[] = 1.0 * ($c[1] / 100); |
|
@@ 1396-1402 (lines=7) @@ | ||
1393 | } else { |
|
1394 | $components[] = floatval($c[1]); |
|
1395 | } |
|
1396 | } elseif ($i == 4) { |
|
1397 | if ($c[0] == "number" && $c[2] == "%") { |
|
1398 | $components[] = 1.0 * ($c[1] / 100); |
|
1399 | } else { |
|
1400 | $components[] = floatval($c[1]); |
|
1401 | } |
|
1402 | } else break; |
|
1403 | ||
1404 | $i++; |
|
1405 | } |