sanitizer = $sanitizer; $this->typeCheck = $typeCheck; } public function processMoveUploadedFile(array $parameters) { $filePath = $parameters['source'] ?? null; if ($filePath !== null && $this->typeCheck->forFilePath($filePath)) { $this->sanitizer->sanitizeFile($filePath); } } }