From 3039c555e278e68745e399fb64fdd8eb0821ad21 Mon Sep 17 00:00:00 2001 From: Patrick O'Meara Date: Tue, 23 Jan 2024 08:37:55 +1100 Subject: [PATCH] Added modify call on CarbonImmutable to PHPStan baseline --- phpstan-baseline.neon | 5 +++++ src/Countries/Australia.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 17eba40a1..54cbdb938 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,10 @@ parameters: ignoreErrors: + - + message: "#^Cannot call method modify\\(\\) on Carbon\\\\CarbonImmutable\\|false\\.$#" + count: 1 + path: src/Countries/Australia.php + - message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#" count: 1 diff --git a/src/Countries/Australia.php b/src/Countries/Australia.php index ac572f858..87dcb6a6f 100644 --- a/src/Countries/Australia.php +++ b/src/Countries/Australia.php @@ -41,7 +41,7 @@ protected function variableHolidays(int $year): array 'Canberra Day' => CarbonImmutable::parse("second monday of march {$year}"), 'Easter Saturday' => $easter->subDay(), 'Easter Sunday' => $easter, - 'Reconciliation Day' => CarbonImmutable::create($year, 5, 27)->modify("monday"), + 'Reconciliation Day' => CarbonImmutable::create($year, 5, 27)->modify('monday'), $this->sovereignBirthdayKey($year) => CarbonImmutable::parse("second monday of june {$year}"), 'Labour Day' => CarbonImmutable::parse("first monday of october {$year}"), ],