henzeb/enumhancer

View on GitHub
src/Exceptions/NotAnEnumException.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Henzeb\Enumhancer\Exceptions;

use UnitEnum;

class NotAnEnumException extends EnumException
{
    public function __construct(string $actual)
    {
        parent::__construct(
            sprintf('expected `%s` but got `%s`', UnitEnum::class, $actual)
        );
    }
}