Type::__construct()   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 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace ekinhbayar\GitAmp\Presentation;
4
5
class Type
6
{
7
    public const PUSH_TO_REPOSITORY = 1;
8
    public const PR_ACTION          = 2;
9
    public const ISSUE_ACTION       = 3;
10
    public const COMMENTED_ON_ISSUE = 4;
11
    public const REPOSITORY_FORKED  = 5;
12
    public const REPOSITORY_CREATED = 6;
13
    public const STARTED_WATCHING   = 7;
14
15
    private int $type;
16
17 23
    public function __construct(int $type)
18
    {
19 23
        $this->type = $type;
20 23
    }
21
22 21
    public function getValue(): int
23
    {
24 21
        return $this->type;
25
    }
26
}
27