diff --git a/core/modules/image/lib/Drupal/image/Controller/ImageStyleController.php b/core/modules/image/lib/Drupal/image/Controller/ImageStyleController.php index 752dbaf..ea88fd3 100644 --- a/core/modules/image/lib/Drupal/image/Controller/ImageStyleController.php +++ b/core/modules/image/lib/Drupal/image/Controller/ImageStyleController.php @@ -12,6 +12,7 @@ use Drupal\Core\Controller\ControllerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Lock\LockBackendInterface; +use Drupal\image\ImageStyleInterface; use Drupal\system\FileController; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\BinaryFileResponse; @@ -81,15 +82,16 @@ public static function create(ContainerInterface $container) { * The request object. * @param string $scheme * The file scheme, defaults to 'private'. - * @param string $image_style + * @param \Drupal\image\ImageStyleInterface $image_style * The image style to deliver. * * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException + * Thrown when the user does not have access to the file. * * @return \Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\Response * The transferred file as response or some error response. */ - public function deliver(Request $request, $scheme, $image_style) { + public function deliver(Request $request, $scheme, ImageStyleInterface $image_style) { $target = $request->query->get('file'); // Check that the style is defined, the scheme is valid, and the image