| @@ 1219-1223 (lines=5) @@ | ||
| 1216 | foreach ($rawComponents as $c) { |
|
| 1217 | $c = $this->reduce($c); |
|
| 1218 | if ($i < 4) { |
|
| 1219 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1220 | $components[] = 255 * ($c[1] / 100); |
|
| 1221 | } else { |
|
| 1222 | $components[] = (float) $c[1]; |
|
| 1223 | } |
|
| 1224 | } elseif ($i === 4) { |
|
| 1225 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1226 | $components[] = 1.0 * ($c[1] / 100); |
|
| @@ 1224-1230 (lines=7) @@ | ||
| 1221 | } else { |
|
| 1222 | $components[] = (float) $c[1]; |
|
| 1223 | } |
|
| 1224 | } elseif ($i === 4) { |
|
| 1225 | if ($c[0] === "number" && $c[2] === "%") { |
|
| 1226 | $components[] = 1.0 * ($c[1] / 100); |
|
| 1227 | } else { |
|
| 1228 | $components[] = (float) $c[1]; |
|
| 1229 | } |
|
| 1230 | } else { |
|
| 1231 | break; |
|
| 1232 | } |
|
| 1233 | ||