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

DuplicatedConstantException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
crap 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