FileParams   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 90
ccs 20
cts 20
cp 1
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setDirPath() 0 4 1
A getDirPath() 0 4 1
A setMainConfigFileName() 0 4 1
A getMainConfigFileName() 0 4 1
A getLocalConfigFileName() 0 4 1
A setLocalConfigFileName() 0 4 1
1
<?php
2
namespace Puppy\Config;
3
4
/**
5
 * Class FileParams
6
 * @package Puppy\Config
7
 * @author Raphaël Lefebvre <[email protected]>
8
 */
9
class FileParams 
10
{
11
    /**
12
     * @var string
13
     */
14
    private $dirPath;
15
16
    /**
17
     * @var string
18
     */
19
    private $mainConfigFileName;
20
21
    /**
22
     * @var string
23
     */
24
    private $localConfigFileName;
25
26
    /**
27
     * @param string $dirPath
28
     * @param string $mainConfigFileName
29
     * @param string $localConfigFileName
30
     */
31 10
    public function __construct($dirPath = 'config', $mainConfigFileName = 'global', $localConfigFileName = 'local')
32
    {
33 10
        $this->setDirPath($dirPath);
34 10
        $this->setMainConfigFileName($mainConfigFileName);
35 10
        $this->setLocalConfigFileName($localConfigFileName);
36 10
    }
37
38
    /**
39
     * Setter of $dirPath
40
     *
41
     * @param string $dirPath
42
     */
43 10
    public function setDirPath($dirPath)
44
    {
45 10
        $this->dirPath = (string)$dirPath;
46 10
    }
47
48
    /**
49
     * Getter of $dirPath
50
     *
51
     * @return string
52
     */
53 10
    public function getDirPath()
54
    {
55 10
        return $this->dirPath;
56
    }
57
58
59
    /**
60
     * Setter of $mainConfigFileName
61
     *
62
     * @param string $mainConfigFileName
63
     */
64 10
    public function setMainConfigFileName($mainConfigFileName)
65
    {
66 10
        $this->mainConfigFileName = (string)$mainConfigFileName;
67 10
    }
68
69
    /**
70
     * Getter of $mainConfigFileName
71
     *
72
     * @return string
73
     */
74 10
    public function getMainConfigFileName()
75
    {
76 10
        return $this->mainConfigFileName;
77
    }
78
79
    /**
80
     * Getter of $localConfigFileName
81
     *
82
     * @return string
83
     */
84 10
    public function getLocalConfigFileName()
85
    {
86 10
        return $this->localConfigFileName;
87
    }
88
89
    /**
90
     * Setter of $localConfigFileName
91
     *
92
     * @param string $localConfigFileName
93
     */
94 10
    public function setLocalConfigFileName($localConfigFileName)
95
    {
96 10
        $this->localConfigFileName = (string)$localConfigFileName;
97 10
    }
98
}
99