From 6f1d1a895a2106089607fe5baa478657712c33f9 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Tue, 28 Apr 2026 09:47:47 +0200 Subject: [PATCH] style: pint new-without-parens fix on WS-6 session-2.5 unit tests Trailing housekeeping after Task 1 (default_crowd_type_id) commit d2059e3. The codebase pint config uses `new_with_parentheses = false` (no `()` after class name when constructor has no args). Two new tests slipped past with `new FormValue()` / `new RequiresDefaultCrowdType()` patterns; pint converts them to `new FormValue` / `new RequiresDefaultCrowdType`. No behavioural change. Co-Authored-By: Claude Opus 4.7 (1M context) --- api/tests/Unit/FormBuilder/Bindings/PersonProvisionerTest.php | 2 +- .../FormBuilder/Publishing/RequiresDefaultCrowdTypeTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/tests/Unit/FormBuilder/Bindings/PersonProvisionerTest.php b/api/tests/Unit/FormBuilder/Bindings/PersonProvisionerTest.php index 08da10d5..bc45acfd 100644 --- a/api/tests/Unit/FormBuilder/Bindings/PersonProvisionerTest.php +++ b/api/tests/Unit/FormBuilder/Bindings/PersonProvisionerTest.php @@ -251,7 +251,7 @@ final class PersonProvisionerTest extends TestCase private function writeValue(string $submissionId, string $fieldId, mixed $value): void { - $row = new FormValue(); + $row = new FormValue; $row->form_submission_id = $submissionId; $row->form_field_id = $fieldId; // NOT NULL column; empty-string for the explicit-null test scenario. diff --git a/api/tests/Unit/FormBuilder/Publishing/RequiresDefaultCrowdTypeTest.php b/api/tests/Unit/FormBuilder/Publishing/RequiresDefaultCrowdTypeTest.php index c38a171b..9d2f3873 100644 --- a/api/tests/Unit/FormBuilder/Publishing/RequiresDefaultCrowdTypeTest.php +++ b/api/tests/Unit/FormBuilder/Publishing/RequiresDefaultCrowdTypeTest.php @@ -23,7 +23,7 @@ final class RequiresDefaultCrowdTypeTest extends TestCase $schema->default_crowd_type_id = $crowdType->id; $schema->save(); - $result = (new RequiresDefaultCrowdType())->evaluate($schema->fresh()); + $result = (new RequiresDefaultCrowdType)->evaluate($schema->fresh()); $this->assertTrue($result->passed); $this->assertSame('requires_default_crowd_type', $result->guardCode); } @@ -33,7 +33,7 @@ final class RequiresDefaultCrowdTypeTest extends TestCase $schema = FormSchema::factory()->create(); $this->assertNull($schema->default_crowd_type_id); - $result = (new RequiresDefaultCrowdType())->evaluate($schema); + $result = (new RequiresDefaultCrowdType)->evaluate($schema); $this->assertFalse($result->passed); $this->assertSame('requires_default_crowd_type', $result->guardCode); $this->assertSame(