Package::setPathList()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Samurai\Project;
3
4
/**
5
 * Class Package
6
 * @package Samurai\Project
7
 * @author Raphaël Lefebvre <[email protected]>
8
 */
9
class Package 
10
{
11
    /**
12
     * @var string
13
     */
14
    private $psr = 'psr-4';
15
16
    /**
17
     * @var string
18
     */
19
    private $namespace = '';
20
21
    /**
22
     * @var array
23
     */
24
    private $pathList = [];
25
26
    /**
27
     * Getter of $psr
28
     *
29
     * @return string
30
     */
31 3
    public function getPsr()
32
    {
33 3
        return $this->psr;
34
    }
35
36
    /**
37
     * Setter of $psr
38
     *
39
     * @param string $psr
40
     */
41
    public function setPsr($psr)
42
    {
43
        $this->psr = $psr;
44
    }
45
46
    /**
47
     * Getter of $namespace
48
     *
49
     * @return string
50
     */
51 3
    public function getNamespace()
52
    {
53 3
        return $this->namespace;
54
    }
55
56
    /**
57
     * Setter of $namespace
58
     *
59
     * @param string $namespace
60
     */
61 3
    public function setNamespace($namespace)
62
    {
63 3
        $this->namespace = trim($namespace, '\\') . '\\';
64 3
    }
65
66
    /**
67
     * Getter of $pathList
68
     *
69
     * @return array
70
     */
71 3
    public function getPathList()
72
    {
73 3
        return $this->pathList;
74
    }
75
76
    /**
77
     * Setter of $pathList
78
     *
79
     * @param array $pathList
80
     */
81 3
    public function setPathList(array $pathList)
82
    {
83 3
        $this->pathList = $pathList;
84 3
    }
85
86
    /**
87
     * @param $path
88
     */
89
    public function addPath($path)
90
    {
91
        $this->pathList[] = $path;
92
    }
93
}
94