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