NodeType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 23
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A MIN() 0 6 1
A MAX() 0 6 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