| Conditions | 5 |
| Paths | 8 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function isFresh(?int $timestamp = null):bool |
||
| 38 | { |
||
| 39 | if (null === $timestamp) { |
||
| 40 | $timestamp = $this->createdAt; |
||
| 41 | } |
||
| 42 | |||
| 43 | foreach ($this->fileResources as $filepath) { |
||
| 44 | if (!file_exists($filepath)) { |
||
| 45 | return false; |
||
| 46 | } |
||
| 47 | |||
| 48 | if ($timestamp < filemtime($filepath)) { |
||
| 49 | return false; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | return true; |
||
| 54 | } |
||
| 78 |