| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function run() |
||
| 32 | { |
||
| 33 | $files = glob(rtrim($this->directory, '/') . DIRECTORY_SEPARATOR . $this->pattern); |
||
| 34 | |||
| 35 | foreach ($files as $file) { |
||
| 36 | if (is_file($file)) { |
||
| 37 | if (filemtime($file) >= $this->date->getTimestamp()) { |
||
| 38 | return new Result(Result::STATUS_PASS, 'At least one file (name: ' . basename($file) . ', created: ' . date('Y-d-m H:i', filemtime($file)) . ') was created after ' . $this->date->format('Y-m-d H:m') . '.'); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | return new Result(Result::STATUS_FAIL, 'No file was found newer than ' . $this->date->format('Y-m-d H:m:s') . '.'); |
||
| 44 | } |
||
| 63 |