Final set of php8.4 changes.

This commit is contained in:
James Cole
2025-05-04 13:50:20 +02:00
parent 51e86448c7
commit 194d22ad90
58 changed files with 151 additions and 157 deletions

View File

@@ -30,17 +30,11 @@ use Tests\unit\Support\Calendar\Periodicity\IntervalProvider;
readonly class CalculatorProvider
{
public IntervalProvider $intervalProvider;
public string $label;
public Periodicity $periodicity;
public int $skip;
private function __construct(IntervalProvider $intervalProvider, Periodicity $periodicity, int $skip = 0)
private function __construct(public IntervalProvider $intervalProvider, public Periodicity $periodicity, public int $skip = 0)
{
$this->skip = $skip;
$this->intervalProvider = $intervalProvider;
$this->periodicity = $periodicity;
$this->label = "{$periodicity->name} {$intervalProvider->label}";
$this->label = "{$this->periodicity->name} {$this->intervalProvider->label}";
}
public static function providePeriodicityWithSkippedIntervals(): \Generator

View File

@@ -28,14 +28,10 @@ use Carbon\Carbon;
readonly class IntervalProvider
{
public Carbon $epoch;
public Carbon $expected;
public string $label;
public function __construct(Carbon $epoch, Carbon $expected)
public function __construct(public Carbon $epoch, public Carbon $expected)
{
$this->epoch = $epoch;
$this->expected = $expected;
$this->label = "given {$epoch->toDateString()} expects {$expected->toDateString()}";
$this->label = "given {$this->epoch->toDateString()} expects {$this->expected->toDateString()}";
}
}

View File

@@ -40,7 +40,7 @@ use Tests\integration\TestCase;
*/
final class NavigationAddPeriodTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
*/
final class NavigationEndOfPeriodTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -38,7 +38,7 @@ use Tests\integration\TestCase;
*/
final class NavigationPreferredCarbonFormatByPeriodTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
*/
final class NavigationPreferredCarbonFormatTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
*/
final class NavigationPreferredEndOfPeriodTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
*/
final class NavigationPreferredRangeFormatTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -39,7 +39,7 @@ use Tests\integration\TestCase;
*/
final class NavigationPreferredSqlFormatTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{

View File

@@ -40,7 +40,7 @@ use Tests\integration\TestCase;
*/
final class NavigationStartOfPeriodTest extends TestCase
{
private Navigation $navigation;
private readonly Navigation $navigation;
public function __construct(string $name)
{