Remove property, update error message
This commit is contained in:
@@ -14,8 +14,6 @@ final class Badge
|
||||
{
|
||||
public string $finalClasses;
|
||||
|
||||
private ?string $colour;
|
||||
|
||||
public function __construct(private string $baseClasses)
|
||||
{
|
||||
}
|
||||
@@ -41,7 +39,7 @@ final class Badge
|
||||
} else {
|
||||
|
||||
if (null === $object) {
|
||||
throw new \RuntimeException("You must specify a badge colour If no instance of BadgeableInterface is provided.");
|
||||
throw new \RuntimeException(sprintf("You must specify a colour for the badge if no instance of %s is provided.", BadgeableInterface::class));
|
||||
}
|
||||
|
||||
$palette = $object->getBadgeColour()->getPalette();
|
||||
|
||||
Reference in New Issue
Block a user