NodeType::MAX()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace lucidtaz\minimax\engine;
6
7
/**
8
 * Enum class
9
 */
10
final class NodeType
11
{
12
    private $value;
13
14 14
    private function __construct()
15
    {
16
        // Forbid manual construction
17 14
    }
18
19 13
    public static function MIN(): NodeType
20
    {
21 13
        $result = new static();
22 13
        $result->value = 'min';
23 13
        return $result;
24
    }
25
26 14
    public static function MAX(): NodeType
27
    {
28 14
        $result = new static();
29 14
        $result->value = 'max';
30 14
        return $result;
31
    }
32
}
33