From cc46eb80747ac8d5604f5baf1a6872253c87c1a6 Mon Sep 17 00:00:00 2001 From: timvandijck Date: Fri, 8 Nov 2024 15:42:25 +0000 Subject: [PATCH] Fix styling --- src/Conversions/ConversionCollection.php | 7 +++---- tests/Conversions/ConversionCollectionConversionsTest.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Conversions/ConversionCollection.php b/src/Conversions/ConversionCollection.php index 9d4db3f7a..de499a758 100644 --- a/src/Conversions/ConversionCollection.php +++ b/src/Conversions/ConversionCollection.php @@ -42,7 +42,7 @@ public function getByName(string $name): Conversion ->getConversions($this->media->collection_name) ->first(fn (Conversion $conversion) => $conversion->getName() === $name); - if (!$conversion) { + if (! $conversion) { throw InvalidConversion::unknownName($name); } @@ -53,7 +53,7 @@ protected function addConversionsFromRelatedModel(Media $media): void { $modelName = Arr::get(Relation::morphMap(), $media->model_type, $media->model_type); - if (!class_exists($modelName)) { + if (! class_exists($modelName)) { return; } @@ -100,7 +100,7 @@ protected function addManipulationToConversion(Manipulations $manipulations, str { /** @var Conversion|null $conversion */ $conversion = $this->first(function (Conversion $conversion) use ($conversionName) { - if (!$conversion->shouldBePerformedOn($this->media->collection_name)) { + if (! $conversion->shouldBePerformedOn($this->media->collection_name)) { return false; } @@ -128,5 +128,4 @@ public function getConversionsFiles(string $collectionName = ''): self ->getConversions($collectionName) ->map(fn (Conversion $conversion) => $conversion->getConversionFile($this->media)); } - } diff --git a/tests/Conversions/ConversionCollectionConversionsTest.php b/tests/Conversions/ConversionCollectionConversionsTest.php index 049af4a67..37ac67e5a 100644 --- a/tests/Conversions/ConversionCollectionConversionsTest.php +++ b/tests/Conversions/ConversionCollectionConversionsTest.php @@ -63,7 +63,7 @@ public function registerMediaCollections(): void ->and($conversions->first()->getName())->toBe('preview') ->and($conversions->first()->getResultExtension())->toBe('png') ->and($conversions->first()->getManipulations()->toArray())->toMatchArray([ - 'fit' => [Fit::Crop, 50, 50], + 'fit' => [Fit::Crop, 50, 50], 'format' => ['png'], ]) ->and($conversions->last()->getName())->toBe('web') @@ -80,7 +80,7 @@ public function registerMediaCollections(): void ->and($conversions->first()->getName())->toBe('preview') ->and($conversions->first()->getResultExtension())->toBe('jpeg') ->and($conversions->first()->getManipulations()->toArray())->toMatchArray([ - 'fit' => [Fit::Crop, 300, 100], + 'fit' => [Fit::Crop, 300, 100], 'format' => ['jpeg'], ]) ->and($conversions->last()->getName())->toBe('web')