protected function cleanup($fileList, $path) { $errorList = []; foreach ($this->cleanFolder as $dir) { array_merge($errorList, $this->doCleanup($fileList, $dir, $path)); } return $errorList; }