diff --git a/src/Twig/Component/Badge.php b/src/Twig/Component/Badge.php index bc09ebd..35e8fd3 100644 --- a/src/Twig/Component/Badge.php +++ b/src/Twig/Component/Badge.php @@ -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();