| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function deleteFilesOlderThanMinutes(int $minutes): Collection |
||
| 56 | { |
||
| 57 | $timeInPast = Carbon::now()->subMinutes($minutes); |
||
| 58 | |||
| 59 | return collect($this->filesystem->allFiles($this->directory)) |
||
| 60 | ->filter(function ($file) use ($timeInPast) { |
||
| 61 | return Carbon |
||
| 62 | ::createFromTimestamp($this->filesystem->lastModified($file)) |
||
| 63 | ->lt($timeInPast); |
||
| 64 | }) |
||
| 65 | ->each(function ($file) { |
||
| 66 | $this->filesystem->delete($file); |
||
| 67 | }); |
||
| 68 | } |
||
| 69 | } |
||
| 70 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..