Example #1
0
 protected function replaceImage($file)
 {
     $size = getimagesize($file);
     if (!$this->dryRun) {
         $source = new HttpSource();
         $newFile = $source->download('http://lorempixel.com/' . $size[0] . '/' . $size[1] . '/');
         rename($newFile, $file);
     }
     echo '[II] Replaced ' . $file . PHP_EOL;
 }