joubertredrat/SharedValueObjects

View on GitHub
src/Exception/ValueObject/Email/InvalidValueException.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace RedRat\SharedValueObjects\Exception\ValueObject\Email;

use InvalidArgumentException;

use function sprintf;

class InvalidValueException extends InvalidArgumentException
{
    public static function handle(string $emailGot): self
    {
        return new self(
            sprintf('Invalid e-mail got [ %s ]', $emailGot)
        );
    }
}