henzeb/enumhancer

View on GitHub
src/Exceptions/SyntaxException.php

Summary

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

namespace Henzeb\Enumhancer\Exceptions;

class SyntaxException extends EnumException
{
    public function __construct(string $expected, mixed $actual)
    {
        parent::__construct(
            sprintf(
                'syntax error, unexpected \'return\' (T_RETURN), expecting \'%s\' or \'%s\'',
                $expected,
                gettype($actual)
            )
        );
    }
}