Skip to content

Commit

Permalink
cs fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Sep 4, 2024
1 parent 1493e2b commit 08c39af
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/Binary/Loader/ChainLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public function find($path)
private static function getLoaderExceptionMessage(string $path, array $exceptions, array $loaders): string
{
$loaderMessages = array_map(static function (string $name, LoaderInterface $loader): string {
return sprintf('%s=[%s]', (new \ReflectionObject($loader))->getShortName(), $name);
return \sprintf('%s=[%s]', (new \ReflectionObject($loader))->getShortName(), $name);
}, array_keys($loaders), $loaders);

$exceptionMessages = array_map(static function (string $message, LoaderInterface $loader): string {
return sprintf('%s=[%s]', (new \ReflectionObject($loader))->getShortName(), $message);
return \sprintf('%s=[%s]', (new \ReflectionObject($loader))->getShortName(), $message);
}, array_keys($exceptions), $exceptions);

return vsprintf('Source image not resolvable "%s" using "%s" %d loaders (internal exceptions: %s).', [
Expand Down
2 changes: 1 addition & 1 deletion src/Binary/Loader/FileSystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FileSystemLoader implements LoaderInterface
public function __construct(
MimeTypeGuesserInterface $mimeGuesser,
MimeTypesInterface $extensionGuesser,
LocatorInterface $locator
LocatorInterface $locator,
) {
$this->mimeTypeGuesser = $mimeGuesser;
$this->extensionGuesser = $extensionGuesser;
Expand Down
2 changes: 1 addition & 1 deletion src/Binary/Loader/FlysystemV2Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FlysystemV2Loader implements LoaderInterface

public function __construct(
MimeTypesInterface $extensionGuesser,
FilesystemOperator $filesystem
FilesystemOperator $filesystem,
) {
$this->extensionGuesser = $extensionGuesser;
$this->filesystem = $filesystem;
Expand Down
2 changes: 1 addition & 1 deletion src/Binary/SimpleMimeTypeGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(MimeTypesInterface $mimeTypeGuesser)
public function guess(string $binary): ?string
{
if (false === $tmpFile = tempnam(sys_get_temp_dir(), 'liip-imagine-bundle')) {
throw new \RuntimeException(sprintf('Temp file can not be created in "%s".', sys_get_temp_dir()));
throw new \RuntimeException(\sprintf('Temp file can not be created in "%s".', sys_get_temp_dir()));
}

try {
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Filter/Type/Background.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
?string $color,
?string $transparency,
?string $position,
Size $size
Size $size,
) {
$this->color = $color;
$this->transparency = $transparency;
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Filter/Type/RelativeResize.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
?float $heighten = null,
?float $widen = null,
?float $increase = null,
?float $scale = null
?float $scale = null,
) {
$this->heighten = $heighten;
$this->widen = $widen;
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Filter/Type/Thumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(
Size $size,
?string $mode = null,
?bool $allowUpscale = null,
?string $filter = null
?string $filter = null,
) {
$this->size = $size;
$this->mode = $mode;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ImagineController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(
FilterService $filterService,
DataManager $dataManager,
SignerInterface $signer,
ControllerConfig $controllerConfig
ControllerConfig $controllerConfig,
) {
$this->filterService = $filterService;
$this->dataManager = $dataManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(
SignerInterface $signer,
EventDispatcherInterface $dispatcher,
?string $defaultResolver = null,
bool $webpGenerate = false
bool $webpGenerate = false,
) {
$this->filterConfig = $filterConfig;
$this->router = $router;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Cache/Resolver/FlysystemResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
RequestContext $requestContext,
string $rootUrl,
string $cachePrefix = 'media/cache',
string $visibility = AdapterInterface::VISIBILITY_PUBLIC
string $visibility = AdapterInterface::VISIBILITY_PUBLIC,
) {
$this->flysystem = $flysystem;
$this->requestContext = $requestContext;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Cache/Resolver/FlysystemV2Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
RequestContext $requestContext,
string $rootUrl,
string $cachePrefix = 'media/cache',
string $visibility = Visibility::PUBLIC
string $visibility = Visibility::PUBLIC,
) {
$this->flysystem = $flysystem;
$this->requestContext = $requestContext;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Cache/Resolver/WebPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(
Filesystem $filesystem,
RequestContext $requestContext,
string $webRootDir,
string $cachePrefix = 'media/cache'
string $cachePrefix = 'media/cache',
) {
$this->filesystem = $filesystem;
$this->requestContext = $requestContext;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Data/DataManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
MimeTypesInterface $extensionGuesser,
FilterConfiguration $filterConfig,
?string $defaultLoader = null,
?string $globalDefaultImage = null
?string $globalDefaultImage = null,
) {
$this->mimeTypeGuesser = $mimeTypeGuesser;
$this->filterConfig = $filterConfig;
Expand Down
2 changes: 1 addition & 1 deletion src/Imagine/Filter/PostProcessor/CwebpPostProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function __construct(
?string $alphaFilter = null,
?int $alphaMethod = null,
?bool $exact = null,
array $metadata = []
array $metadata = [],
) {
parent::__construct($executablePath, $temporaryRootPath);

Expand Down
10 changes: 5 additions & 5 deletions src/Service/FilterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
CacheManager $cacheManager,
bool $webpGenerate = false,
array $webpOptions = [],
?LoggerInterface $logger = null
?LoggerInterface $logger = null,
) {
$this->dataManager = $dataManager;
$this->filterManager = $filterManager;
Expand Down Expand Up @@ -79,7 +79,7 @@ public function warmUpCache(
string $path,
string $filter,
?string $resolver = null,
bool $forced = false
bool $forced = false,
): bool {
$warmedUp = false;

Expand All @@ -106,7 +106,7 @@ public function getUrlOfFilteredImageWithRuntimeFilters(
string $filter,
array $runtimeFilters = [],
?string $resolver = null,
bool $webpSupported = false
bool $webpSupported = false,
): string {
$runtimePath = $this->cacheManager->getRuntimePath($path, $runtimeFilters);
$runtimeOptions = [
Expand Down Expand Up @@ -146,7 +146,7 @@ private function resolveFilterPathContainer(
FilterPathContainer $filterPathContainer,
string $filter,
?string $resolver = null,
bool $webpSupported = false
bool $webpSupported = false,
): string {
$path = $filterPathContainer->getTarget();

Expand All @@ -166,7 +166,7 @@ private function warmUpCacheFilterPathContainer(
FilterPathContainer $filterPathContainer,
string $filter,
?string $resolver = null,
bool $forced = false
bool $forced = false,
): bool {
if ($forced || !$this->cacheManager->isStored($filterPathContainer->getTarget(), $filter, $resolver)) {
$this->cacheManager->store(
Expand Down

0 comments on commit 08c39af

Please sign in to comment.