Olivier Massot 2 лет назад
Родитель
Сommit
515b494324
1 измененных файлов с 1 добавлено и 14 удалено
  1. 1 14
      src/State/Provider/Core/DownloadRequestProvider.php

+ 1 - 14
src/State/Provider/Core/DownloadRequestProvider.php

@@ -26,17 +26,6 @@ final class DownloadRequestProvider implements ProviderInterface
         private readonly FileManager    $fileManager,
     ) {}
 
-    /**
-     * @param string $resourceClass
-     * @param string|null $operationName
-     * @param array<mixed> $context
-     * @return bool
-     */
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return DownloadRequest::class === $resourceClass;
-    }
-
     /**
      * @param Operation $operation
      * @param array<mixed> $uriVariables
@@ -50,9 +39,7 @@ final class DownloadRequestProvider implements ProviderInterface
             throw new RuntimeException('not supported', 500);
         }
 
-        $id = $uriVariables['fileId'];
-
-        return $this->serveFile($id);
+        return $this->serveFile($uriVariables['fileId']);
     }
 
     /**