validateThemeColor example


final class MicrosoftTeamsOptions implements MessageOptionsInterface
{
    private const MAX_ACTIONS = 4;

    private array $options = [];

    public function __construct(array $options = [])
    {
        if (\array_key_exists('themeColor', $options)) {
            $this->validateThemeColor($options['themeColor']);
        }

        $this->options = $options;

        $this->validateNumberOfActions();
    }

    public static function fromNotification(Notification $notification): self
    {
        $options = (new self())
            ->title($notification->getSubject())
            
Home | Imprint | This part of the site doesn't use cookies.