Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class FileExistsCheck implements Check |
||
17 | { |
||
18 | const IDENTIFIER = 'base:files:fileExists'; |
||
19 | |||
20 | private $filename; |
||
21 | |||
22 | public function run() |
||
23 | { |
||
24 | if (file_exists($this->filename)) { |
||
25 | return new Result(Result::STATUS_PASS, 'The file "' . $this->filename . '" exists.'); |
||
26 | }else{ |
||
27 | return new Result(Result::STATUS_FAIL, 'The file "' . $this->filename . '" does not exist.'); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param $filename |
||
33 | */ |
||
34 | public function init($filename) |
||
37 | } |
||
38 | |||
39 | public function getIdentifier() |
||
44 |