skip = $skip; $this->count = $count; $this->totalCount = $totalCount; } public function work() { $this->log(self::class); $fileEntries = $this->fileEntryRepository->get($this->skip, $this->count); $root = $this->snapshotRepository->load()->root; foreach ($fileEntries as $fileEntry) { $absoluteFilename = $this->fileEntryRepository->calcFullPath($fileEntry, $root); $this->log($absoluteFilename); $fileEntry->last_modified_date = filemtime($absoluteFilename); $this->fileEntryRepository->createOrUpdate($fileEntry); } } public function toArray() { return ['type' => self::class, 'args' => [$this->skip, $this->count, $this->totalCount]]; } public function toDescription(): string { return sprintf('Determining last modified dates... %s%%', round(100 * $this->skip / $this->totalCount)); } }