From 8a43055d6df855fc0e0ccb3af92975f486657e9b Mon Sep 17 00:00:00 2001 From: rubenvanassche Date: Thu, 12 Oct 2023 13:03:49 +0000 Subject: [PATCH] Fix styling --- src/Transformers/DataTransformer.php | 2 +- tests/ValidationTest.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Transformers/DataTransformer.php b/src/Transformers/DataTransformer.php index 6ee24535..8a54fef2 100644 --- a/src/Transformers/DataTransformer.php +++ b/src/Transformers/DataTransformer.php @@ -238,7 +238,7 @@ protected function resolvePropertyValue( }; if ($value instanceof TransformableData && $this->transformValues) { - return $value->transform($this->transformValues, $wrapExecutionType, $this->mapPropertyNames,); + return $value->transform($this->transformValues, $wrapExecutionType, $this->mapPropertyNames, ); } return $value; diff --git a/tests/ValidationTest.php b/tests/ValidationTest.php index bdf3fc05..4a7d8cf4 100644 --- a/tests/ValidationTest.php +++ b/tests/ValidationTest.php @@ -12,6 +12,10 @@ use Illuminate\Validation\Rules\In as LaravelIn; use Illuminate\Validation\ValidationException; use Illuminate\Validation\Validator; + +use function Pest\Laravel\mock; +use function PHPUnit\Framework\assertFalse; + use Spatie\LaravelData\Attributes\DataCollectionOf; use Spatie\LaravelData\Attributes\MapInputName; use Spatie\LaravelData\Attributes\MapName; @@ -65,8 +69,6 @@ use Spatie\LaravelData\Tests\Fakes\Support\FakeInjectable; use Spatie\LaravelData\Tests\Fakes\ValidationAttributes\PassThroughCustomValidationAttribute; use Spatie\LaravelData\Tests\TestSupport\DataValidationAsserter; -use function Pest\Laravel\mock; -use function PHPUnit\Framework\assertFalse; it('can validate a string', function () { $dataClass = new class () extends Data { @@ -2379,7 +2381,7 @@ public static function rules(ValidationContext $context): array })->skip('V4: The rule inferrers need to be rewritten/removed for this, we need to first add attribute rules and then decide require stuff'); it('will not transform non set optional properties ', function () { - $dataClass = new class extends Data { + $dataClass = new class () extends Data { public array|Optional $optional; };