| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public static function materialDesignColor(?string $name, string $prefix = ""): string { |
||
| 44 | |||
| 45 | $colors = ColorHelper::getMaterialDesignColorPalette(); |
||
| 46 | |||
| 47 | $color = $colors[0]; |
||
| 48 | |||
| 49 | foreach ($colors as $current) { |
||
| 50 | if ($name !== $current->getName()) { |
||
| 51 | continue; |
||
| 52 | } |
||
| 53 | $color = $current; |
||
| 54 | } |
||
| 55 | |||
| 56 | return implode("", [$prefix, $color->getName()]); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |