Skip to content

Commit

Permalink
run composer cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucanis committed Sep 30, 2022
1 parent f36a006 commit cfb941d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Controller/Front/LegacyImageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

namespace TheliaLibrary\Controller\Front;

use Symfony\Component\Routing\Annotation\Route;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\Routing\Annotation\Route;
use Thelia\Controller\Front\BaseFrontController;
use Thelia\Core\HttpFoundation\Response;
use Thelia\Model\ConfigQuery;
Expand Down Expand Up @@ -48,7 +48,7 @@ public function getImage(
throw new HttpException(400, 'Bad format value');
}

$formattedImagePath = THELIA_WEB_DIR.'legacy-image-library'.DS.$itemType."_image_".$imageId.DS.$region.DS.$size.DS.$rotation;
$formattedImagePath = THELIA_WEB_DIR.'legacy-image-library'.DS.$itemType.'_image_'.$imageId.DS.$region.DS.$size.DS.$rotation;
if (!is_dir($formattedImagePath)) {
if (!@mkdir($formattedImagePath, 0755, true)) {
throw new \RuntimeException(sprintf('Failed to create %s file in cache directory', $formattedImagePath));
Expand Down Expand Up @@ -89,7 +89,7 @@ public function getImageInformation(
json_encode(
[
'@context' => 'http://iiif.io/api/image/3/context.json',
'id' => URL::getInstance()->absoluteUrl('legacy-image-library/'.$itemType."_image_".$imageId),
'id' => URL::getInstance()->absoluteUrl('legacy-image-library/'.$itemType.'_image_'.$imageId),
'type' => 'ImageService3',
'protocol' => 'http://iiif.io/api/image',
'profile' => 'level2',
Expand All @@ -115,7 +115,7 @@ private function getSourceFilePath($itemType, $imageId)
$queryClass = $tableMap->getClassName().'ImageQuery';

/** @var ProductImage $image */
$image = ($queryClass::create())
$image = $queryClass::create()
->filterById($imageId)
->filterByVisible(1)
->findOne();
Expand Down

0 comments on commit cfb941d

Please sign in to comment.