1 | <?php |
||
12 | class Config extends ArrayConfig |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $env; |
||
18 | /** |
||
19 | * @var FileParams |
||
20 | */ |
||
21 | private $fileParams; |
||
22 | /** |
||
23 | * @var IFileReader |
||
24 | */ |
||
25 | private $fileReader; |
||
26 | |||
27 | /** |
||
28 | * @param string $env |
||
29 | * @param FileParams $fileParams |
||
|
|||
30 | * @param IFileReader $fileReader |
||
31 | */ |
||
32 | 10 | public function __construct($env = '', FileParams $fileParams = null, IFileReader $fileReader = null) |
|
39 | |||
40 | /** |
||
41 | * Getter of $env |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 10 | public function getEnv() |
|
49 | |||
50 | /** |
||
51 | * Getter of $fileParams |
||
52 | * |
||
53 | * @return FileParams |
||
54 | */ |
||
55 | 10 | public function getFileParams() |
|
59 | |||
60 | /** |
||
61 | * Getter of $fileReader |
||
62 | * |
||
63 | * @return IFileReader |
||
64 | */ |
||
65 | 10 | public function getFileReader() |
|
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | 10 | public function getMainFilePath() |
|
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | 10 | public function getEnvFilePath() |
|
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | 10 | public function getLocalFilePath() |
|
102 | |||
103 | /** |
||
104 | * @return array |
||
105 | */ |
||
106 | 10 | private function getData() |
|
116 | |||
117 | /** |
||
118 | * @param string[] $filePaths |
||
119 | * @return array |
||
120 | */ |
||
121 | 10 | private function getFilesContent(array $filePaths) |
|
132 | |||
133 | /** |
||
134 | * @param string $filePath |
||
135 | * @return string |
||
136 | */ |
||
137 | 10 | private function getRealPath($filePath) |
|
145 | |||
146 | /** |
||
147 | * Setter of $env |
||
148 | * |
||
149 | * @param string $env |
||
150 | */ |
||
151 | 10 | private function setEnv($env) |
|
155 | |||
156 | /** |
||
157 | * Setter of $fileParams |
||
158 | * |
||
159 | * @param FileParams $fileParams |
||
160 | */ |
||
161 | 10 | private function setFileParams(FileParams $fileParams) |
|
165 | |||
166 | /** |
||
167 | * Setter of $fileReader |
||
168 | * |
||
169 | * @param IFileReader $fileReader |
||
170 | */ |
||
171 | 10 | private function setFileReader(IFileReader $fileReader) |
|
175 | } |
||
176 | |||
177 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.