joubertredrat/SharedValueObjects

View on GitHub
src/Exception/ValueObject/Brazil/Telecom/AreaCode/InvalidNumberException.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace RedRat\SharedValueObjects\Exception\ValueObject\Brazil\Telecom\AreaCode;

use InvalidArgumentException;

use function sprintf;

class InvalidNumberException extends InvalidArgumentException
{
    public static function handle(string $numberGot): self
    {
        return new self(
            sprintf('Invalid number got [ %s ]', $numberGot)
        );
    }
}