chore: major code cleanup and type safety using phpstan

This commit is contained in:
Björn Fromme committed 2026-04-16 17:11:16 +02:00
1 parent 060cbea9da
commit 3da73d626b
103 files changed
+976 -1192

No files matched your search

@@ -34,7 +34,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertTrue($result, 'Baby participant (1 year old) should be eligible regardless of ski pass availability');
self::assertTrue($result, 'Baby participant (1 year old) should be eligible regardless of ski pass availability');
}
public function testTwoYearOldParticipantIsEligibleAsBaby(): void
@@ -50,7 +50,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertTrue($result, 'Participant at BABY_MAX_AGE (2 years) should be eligible');
self::assertTrue($result, 'Participant at BABY_MAX_AGE (2 years) should be eligible');
}
public function testThreeYearOldParticipantIsNotBabyEligible(): void
@@ -66,7 +66,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertFalse($result, 'Participant over BABY_MAX_AGE (3 years) should not be eligible without ski passes');
self::assertFalse($result, 'Participant over BABY_MAX_AGE (3 years) should not be eligible without ski passes');
}
public function testAdultParticipantWithSkiPassIsEligible(): void
@@ -82,7 +82,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertTrue($result, 'Adult participant with available ski passes should be eligible');
self::assertTrue($result, 'Adult participant with available ski passes should be eligible');
}
public function testParticipantWithoutDateOfBirthIsNotEligible(): void
@@ -98,7 +98,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertFalse($result, 'Participant without date of birth should not be eligible');
self::assertFalse($result, 'Participant without date of birth should not be eligible');
}
public function testNewbornBabyIsEligible(): void
@@ -114,7 +114,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertTrue($result, 'Newborn baby (0 years old) should be eligible');
self::assertTrue($result, 'Newborn baby (0 years old) should be eligible');
}
public function testBabyAgeIsCalculatedAtTravelDate(): void
@@ -135,7 +135,7 @@ class ParticipantEligibilityCheckerTest extends TestCase
$result = $this->service->isParticipantEligible($bookingDto, 0);
$this->assertTrue($result, 'Age should be calculated at travel date, not current date');
self::assertTrue($result, 'Age should be calculated at travel date, not current date');
}
private function createTravelWithNoSkiPasses(): Travel