From 1ac19e1d021aefb69f999b80008fd24c33872698 Mon Sep 17 00:00:00 2001 From: Jeroen van den Enden Date: Mon, 2 Oct 2023 22:50:36 +0000 Subject: [PATCH] Modernize code base --- src/Controller/TeamCalendarController.php | 10 +++++----- src/Controller/TeamListController.php | 8 ++++---- src/EndroidSoccerCalendarBundle.php | 2 +- tests/EndroidSoccerCalendarBundleTest.php | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Controller/TeamCalendarController.php b/src/Controller/TeamCalendarController.php index 64aff5e..e4b30b6 100644 --- a/src/Controller/TeamCalendarController.php +++ b/src/Controller/TeamCalendarController.php @@ -15,11 +15,11 @@ final class TeamCalendarController { public function __construct( - private CompetitionLoaderInterface $competitionLoader, - private TeamLoaderInterface $teamLoader, - private GameLoaderInterface $gameLoader, - private CalendarFactory $calendarFactory, - private IcalWriter $calendarWriter + private readonly CompetitionLoaderInterface $competitionLoader, + private readonly TeamLoaderInterface $teamLoader, + private readonly GameLoaderInterface $gameLoader, + private readonly CalendarFactory $calendarFactory, + private readonly IcalWriter $calendarWriter ) { } diff --git a/src/Controller/TeamListController.php b/src/Controller/TeamListController.php index 87bd061..eadd147 100644 --- a/src/Controller/TeamListController.php +++ b/src/Controller/TeamListController.php @@ -14,10 +14,10 @@ final class TeamListController { public function __construct( /** @var array */ - private array $competitionNames, - private Environment $templating, - private CompetitionLoaderInterface $competitionLoader, - private TeamLoaderInterface $teamLoader + private readonly array $competitionNames, + private readonly Environment $templating, + private readonly CompetitionLoaderInterface $competitionLoader, + private readonly TeamLoaderInterface $teamLoader ) { } diff --git a/src/EndroidSoccerCalendarBundle.php b/src/EndroidSoccerCalendarBundle.php index 561a11b..fdfdce9 100644 --- a/src/EndroidSoccerCalendarBundle.php +++ b/src/EndroidSoccerCalendarBundle.php @@ -6,6 +6,6 @@ use Symfony\Component\HttpKernel\Bundle\Bundle; -class EndroidSoccerCalendarBundle extends Bundle +final class EndroidSoccerCalendarBundle extends Bundle { } diff --git a/tests/EndroidSoccerCalendarBundleTest.php b/tests/EndroidSoccerCalendarBundleTest.php index d176157..bb65b6e 100644 --- a/tests/EndroidSoccerCalendarBundleTest.php +++ b/tests/EndroidSoccerCalendarBundleTest.php @@ -6,9 +6,9 @@ use PHPUnit\Framework\TestCase; -class EndroidSoccerCalendarBundleTest extends TestCase +final class EndroidSoccerCalendarBundleTest extends TestCase { - public function testNoTestsYet() + public function testNoTestsYet(): void { $this->assertTrue(true); }