Symbol::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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