SourceFolder   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 61.53%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 48
ccs 8
cts 13
cp 0.6153
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getPackagePrefix() 0 4 1
A setPackagePrefix() 0 5 1
A __construct() 0 5 1
A getPath() 0 4 1
A getType() 0 4 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