1
0
Fork 0
mirror of https://github.com/archtechx/enums.git synced 2025-12-14 00:04:03 +00:00
This commit is contained in:
Samuel Štancl 2022-02-20 20:58:57 +01:00
parent f9fe9e5cab
commit 41b423da38
11 changed files with 146 additions and 91 deletions

View file

@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace ArchTech\Enums\Exceptions;
use Error;
class UndefinedCaseError extends Error
{
public function __construct(string $enum, string $case)
{
// Matches the error message of invalid Foo::BAR access
parent::__construct("Undefined constant $enum::$case");
}
}