Unverified Commit c289b697 authored by Alex Pott's avatar Alex Pott
Browse files

task: #3577113 Setting properties in FileUploadHandler constructor is unnecessary

By: kim.pepper
(cherry picked from commit d1911787)
parent c0336941
Loading
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -33,13 +33,6 @@ class FileUploadHandler implements FileUploadHandlerInterface {
   */
  const DEFAULT_EXTENSIONS = 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp';

  /**
   * The file validator.
   *
   * @var \Drupal\file\Validation\FileValidatorInterface
   */
  protected FileValidatorInterface $fileValidator;

  public function __construct(
    protected FileSystemInterface $fileSystem,
    protected EntityTypeManagerInterface $entityTypeManager,
@@ -50,20 +43,11 @@ public function __construct(
    protected AccountInterface $currentUser,
    protected RequestStack $requestStack,
    protected FileRepositoryInterface $fileRepository,
    protected FileValidatorInterface $file_validator,
    protected FileValidatorInterface $fileValidator,
    #[Autowire(service: 'lock')]
    protected LockBackendInterface $lock,
    protected BasicRecursiveValidatorFactory $validatorFactory,
  ) {
    $this->fileSystem = $fileSystem;
    $this->entityTypeManager = $entityTypeManager;
    $this->streamWrapperManager = $streamWrapperManager;
    $this->eventDispatcher = $eventDispatcher;
    $this->mimeTypeGuesser = $mimeTypeGuesser;
    $this->currentUser = $currentUser;
    $this->requestStack = $requestStack;
    $this->fileRepository = $fileRepository;
    $this->fileValidator = $file_validator;
  }

  /**