Passed
Push — main ( beefde...1d7b81 )
by Yunfeng
55s queued 13s
created

UndefinedCaseException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BiiiiiigMonster\LaravelEnum\Exceptions;
6
7
use Exception;
8
9
class UndefinedCaseException extends Exception
10
{
11
    public function __construct(string $enum, string $case)
12
    {
13
        // Matches the error message of invalid Foo::BAR access
14
        parent::__construct("Undefined constant $enum::$case");
15
    }
16
}
17