Symbol   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 37
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setType() 0 3 1
A __construct() 0 3 1
A getType() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Ctefan\Kiwi;
5
6
class Symbol
7
{
8
    public const INVALID = 0;
9
    public const EXTERNAL = 1;
10
    public const SLACK = 2;
11
    public const ERROR = 3;
12
    public const DUMMY = 4;
13
14
    /**
15
     * @var int
16
     */
17
    protected $type;
18
19
    /**
20
     * Symbol constructor.
21
     *
22
     * @param int $type
23
     */
24 21
    public function __construct(int $type = self::INVALID)
25
    {
26 21
        $this->type = $type;
27 21
    }
28
29
    /**
30
     * @return int
31
     */
32 21
    public function getType(): int
33
    {
34 21
        return $this->type;
35
    }
36
37
    /**
38
     * @param int $type
39
     */
40
    public function setType(int $type): void
41
    {
42
        $this->type = $type;
43
    }
44
}