Passed
Push — master ( f34f5c...ba26d1 )
by 4kizuki
02:19
created

DuplicatedConstantException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
1
<?php
2
3
namespace Akizuki\enum\Exceptions;
4
5
use LogicException;
6
7
/**
8
 * [ Exception ] Same Value Constant Found
9
 *
10
 * This exception will be thrown if two constants have the same value.
11
 *
12
 * @author 4kizuki <[email protected]>
13
 * @copyright 2017 4kizuki. All Rights Reserved.
14
 * @package 4kizuki/php-enum
15
 * @since 1.0.0
16
 */
17
class DuplicatedConstantException extends LogicException {
18
    
19 1
    public function __construct( string $className, string $constName ) {
20 1
        parent::__construct( "Constant duplication found: \"{$className}::{$constName}\"." );
21 1
    }
22
    
23
}
24