From cad4c6ad88c3e33c0ca19faa9c26184162db8b65 Mon Sep 17 00:00:00 2001 From: rubenvanassche Date: Mon, 22 Jan 2024 13:14:00 +0000 Subject: [PATCH] Fix styling --- src/DataCollection.php | 1 - src/Support/DataType.php | 3 +-- tests/Support/DataParameterTest.php | 1 - tests/Support/DataPropertyTypeTest.php | 2 +- tests/Support/DataReturnTypeTest.php | 5 ++--- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/DataCollection.php b/src/DataCollection.php index 5e4fe370e..d4bf71d09 100644 --- a/src/DataCollection.php +++ b/src/DataCollection.php @@ -5,7 +5,6 @@ use ArrayAccess; use Illuminate\Support\Collection; use Illuminate\Support\Enumerable; -use Illuminate\Support\LazyCollection; use Spatie\LaravelData\Concerns\BaseDataCollectable; use Spatie\LaravelData\Concerns\ContextableData; use Spatie\LaravelData\Concerns\EnumerableMethods; diff --git a/src/Support/DataType.php b/src/Support/DataType.php index dd480a720..ea485f21a 100644 --- a/src/Support/DataType.php +++ b/src/Support/DataType.php @@ -12,8 +12,7 @@ public function __construct( public readonly bool $isNullable, public readonly bool $isMixed, public readonly DataTypeKind $kind, - ) - { + ) { } public function findAcceptedTypeForBaseType(string $class): ?string diff --git a/tests/Support/DataParameterTest.php b/tests/Support/DataParameterTest.php index a5ab4e230..dfd67d376 100644 --- a/tests/Support/DataParameterTest.php +++ b/tests/Support/DataParameterTest.php @@ -3,7 +3,6 @@ use Spatie\LaravelData\Data; use Spatie\LaravelData\Support\Creation\CreationContext; use Spatie\LaravelData\Support\Creation\CreationContextFactory; -use Spatie\LaravelData\Support\DataPropertyType; use Spatie\LaravelData\Support\DataType; use Spatie\LaravelData\Tests\Factories\FakeDataStructureFactory; use Spatie\LaravelData\Tests\Fakes\SimpleData; diff --git a/tests/Support/DataPropertyTypeTest.php b/tests/Support/DataPropertyTypeTest.php index 2eab9eeb1..5f3c56e64 100644 --- a/tests/Support/DataPropertyTypeTest.php +++ b/tests/Support/DataPropertyTypeTest.php @@ -1132,7 +1132,7 @@ public function __construct( expect($type)->lazyType->toBe(RelationalLazy::class); }); -it('will mark an array, collection and paginators as a default type kind when no data collection was specified', function (){ +it('will mark an array, collection and paginators as a default type kind when no data collection was specified', function () { $type = resolveDataType(new class () { public array $property; }); diff --git a/tests/Support/DataReturnTypeTest.php b/tests/Support/DataReturnTypeTest.php index 482b439a4..9ca83a16d 100644 --- a/tests/Support/DataReturnTypeTest.php +++ b/tests/Support/DataReturnTypeTest.php @@ -16,7 +16,6 @@ use Spatie\LaravelData\Contracts\WrappableData; use Spatie\LaravelData\DataCollection; use Spatie\LaravelData\Enums\DataTypeKind; -use Spatie\LaravelData\Support\DataReturnType; use Spatie\LaravelData\Support\DataType; use Spatie\LaravelData\Support\Factories\DataReturnTypeFactory; use Spatie\LaravelData\Support\Types\NamedType; @@ -127,7 +126,7 @@ public function nullableArray(): ?array ]; }); -it('will store return types in the factory as a caching mechanism', function (){ +it('will store return types in the factory as a caching mechanism', function () { $factory = app(DataReturnTypeFactory::class); $reflection = new ReflectionMethod(\TestReturnTypeSubject::class, 'array'); @@ -139,7 +138,7 @@ public function nullableArray(): ?array expect(spl_object_id($firstBuild))->toBe(spl_object_id($secondBuild)); }); -it('will cache nullable and non nullable return types separately', function (){ +it('will cache nullable and non nullable return types separately', function () { $factory = app(DataReturnTypeFactory::class); $firstReflection = new ReflectionMethod(\TestReturnTypeSubject::class, 'array');