| Conditions | 4 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 20 | public function has(string $view): bool |
|
| 44 | { |
||
| 45 | 20 | $path = $this->get($view); |
|
| 46 | 20 | $real = $this->flow->native()->path($view . $this->flow->ext()); |
|
| 47 | 20 | $directory = \dirname($path); |
|
| 48 | |||
| 49 | 20 | if (empty($this->paths[$view]) && ($this->flow->debugMode() || !File::exists($path))) |
|
| 50 | { |
||
| 51 | 20 | Dir::make($directory); |
|
| 52 | |||
| 53 | 20 | return false; |
|
| 54 | } |
||
| 55 | |||
| 56 | 5 | return \filemtime($path) > \filemtime($real); |
|
| 57 | } |
||
| 84 |