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

+8 -8
View File
@@ -41,12 +41,12 @@ class TravelTest extends TestCase
$travel->transportationServices = [$outboundPkw, $inboundPkw];
$outboundResult = $travel->getTransportationServicesByDirection('HIN');
$this->assertCount(1, $outboundResult);
$this->assertSame($outboundPkw, $outboundResult[0]);
self::assertCount(1, $outboundResult);
self::assertSame($outboundPkw, $outboundResult[0]);
$inboundResult = $travel->getTransportationServicesByDirection('RUECK');
$this->assertCount(1, $inboundResult);
$this->assertSame($inboundPkw, $inboundResult[0]);
self::assertCount(1, $inboundResult);
self::assertSame($inboundPkw, $inboundResult[0]);
}
/**
@@ -77,7 +77,7 @@ class TravelTest extends TestCase
$result = $travel->getTransportationServicesByDirection('HIN');
// Both PKW services should be returned (filtering happens at field options provider level)
$this->assertCount(2, $result);
self::assertCount(2, $result);
}
/**
@@ -104,9 +104,9 @@ class TravelTest extends TestCase
$result = $travel->getTransportationServicesByDirection('HIN');
$this->assertCount(2, $result);
self::assertCount(2, $result);
// BUS comes before PKW alphabetically
$this->assertSame('BUS', $result[0]->subType);
$this->assertSame('PKW', $result[1]->subType);
self::assertSame('BUS', $result[0]->subType);
self::assertSame('PKW', $result[1]->subType);
}
}