瀏覽代碼

Post MR fixes

Olivier Massot 2 年之前
父節點
當前提交
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']);
     }
 
     /**