From 48e62d77f7813196eebe43abefbbdc66511d0d3b Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 12 Dec 2024 10:31:38 +0100 Subject: [PATCH] apply cs fixer --- .php-cs-fixer.dist.php | 1 + Async/ResolveCache.php | 4 ++-- Binary/Loader/FileSystemLoader.php | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index bf90ea59..86f4b085 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -89,5 +89,6 @@ 'semicolon_after_instruction' => true, 'strict_comparison' => true, 'strict_param' => true, + 'trailing_comma_in_multiline' => ['elements' => ['arrays']], // trailing comma on parameters / arguments not compatible with PHP 7 'get_class_to_class_keyword' => false, // not compatible with PHP 7 ]); diff --git a/Async/ResolveCache.php b/Async/ResolveCache.php index 60594e53..ec5d93d1 100644 --- a/Async/ResolveCache.php +++ b/Async/ResolveCache.php @@ -25,7 +25,7 @@ class ResolveCache implements \JsonSerializable private $path; /** - * @var array|\string[]|null + * @var array|string[]|null */ private $filters; @@ -50,7 +50,7 @@ public function getPath(): string } /** - * @return \string[]|null + * @return string[]|null */ public function getFilters() { diff --git a/Binary/Loader/FileSystemLoader.php b/Binary/Loader/FileSystemLoader.php index 6185e46c..de13ecfb 100644 --- a/Binary/Loader/FileSystemLoader.php +++ b/Binary/Loader/FileSystemLoader.php @@ -70,11 +70,11 @@ public function __construct( public function find($path) { $path = $this->locator->locate($path); - - if (\is_file($path) === false) { + + if (false === is_file($path)) { throw new NotLoadableException(\sprintf('Source image: "%s" is no file.', $path)); } - + $mimeType = $this->mimeTypeGuesser instanceof DeprecatedMimeTypeGuesserInterface ? $this->mimeTypeGuesser->guess($path) : $this->mimeTypeGuesser->guessMimeType($path); $extension = $this->getExtension($mimeType);