/** * @param string $destination */ private function cleanDestinationWithCaution($destination) { if (!$this->fileSystem->isDirEmpty($destination)) { if ($this->io->ask('Destination is not empty. Do you want to erase it?', TRUE)) { $this->fileSystem->purgeDir($destination); } } }