SourceFolder::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Paysera\PhpStormHelper\Entity;
6
7
class SourceFolder
8
{
9
    const TYPE_SOURCE = 'source';
10
    const TYPE_TEST_SOURCE = 'test_source';
11
    const TYPE_EXCLUDED = 'excluded';
12
13
    private $path;
14
    private $type;
15
16
    /**
17
     * @var string|null
18
     */
19
    private $packagePrefix;
20
21 6
    public function __construct(string $path, string $type)
22
    {
23 6
        $this->path = $path;
24 6
        $this->type = $type;
25 6
    }
26
27 6
    public function getPath(): string
28
    {
29 6
        return $this->path;
30
    }
31
32 5
    public function getType(): string
33
    {
34 5
        return $this->type;
35
    }
36
37
    /**
38
     * @return string|null
39
     */
40
    public function getPackagePrefix()
41
    {
42
        return $this->packagePrefix;
43
    }
44
45
    /**
46
     * @param string|null $packagePrefix
47
     * @return $this
48
     */
49
    public function setPackagePrefix($packagePrefix): self
50
    {
51
        $this->packagePrefix = $packagePrefix;
52
        return $this;
53
    }
54
}
55