attachment = new Attachment(); $this->replacer = new ReplacerService(); } public function run() { $images = $this->attachment->getImagesWithoutS3MetaData(); echo sprintf('Count for the processing: %d
', count($images)); foreach ($images as $post) { $this->replacer->processImage($post); } echo sprintf('Processed: %d
', Counters::$processedImages); echo sprintf('Not found: %d
', Counters::$imagesNotFound); } }