Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
34 | public function getMtime(string $filename): int |
||
35 | { |
||
36 | 1 | $mtime = @filemtime($filename); |
|
37 | if ($mtime === false) { |
||
38 | throw new RuntimeException('Could not determine mtime for ' . $filename); |
||
39 | // ... or should we adhere to PHP's int|false convention? |
||
40 | } |
||
41 | return $mtime; |
||
42 | } |
||
43 | } |
||
44 |