Tweak error message
This commit is contained in:
@@ -48,7 +48,7 @@ final class Badge
|
|||||||
|
|
||||||
if (!in_array($colour, $cases)) {
|
if (!in_array($colour, $cases)) {
|
||||||
$formattedCases = implode(', ', array_map(fn (string $s) => '"'.$s.'"', $cases));
|
$formattedCases = implode(', ', array_map(fn (string $s) => '"'.$s.'"', $cases));
|
||||||
throw new \RuntimeException(sprintf('"%s" is not a valid Badge colour. Available options are: %s', $colour, $formattedCases));
|
throw new \RuntimeException(sprintf('"%s" is not a valid badge colour. Available options are: %s.', $colour, $formattedCases));
|
||||||
}
|
}
|
||||||
|
|
||||||
$colour = strtoupper($colour);
|
$colour = strtoupper($colour);
|
||||||
|
|||||||
Reference in New Issue
Block a user