From 4910a69adf49c2ad273eababe3b78827852a2bbb Mon Sep 17 00:00:00 2001 From: Dorian Villet Date: Sun, 24 Mar 2024 11:52:09 +0100 Subject: [PATCH] Constructor with only one promoted property should still be on its own line. --- src/Clock/FixedClock.php | 5 +++-- src/TimeZoneOffset.php | 5 +++-- src/TimeZoneRegion.php | 5 +++-- src/Year.php | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Clock/FixedClock.php b/src/Clock/FixedClock.php index 3a22e5d..d89c07a 100644 --- a/src/Clock/FixedClock.php +++ b/src/Clock/FixedClock.php @@ -16,8 +16,9 @@ final class FixedClock implements Clock /** * @param Instant $instant The time to set the clock at. */ - public function __construct(private Instant $instant) - { + public function __construct( + private Instant $instant + ) { } public function getTime(): Instant diff --git a/src/TimeZoneOffset.php b/src/TimeZoneOffset.php index 26a5ff9..90128a5 100644 --- a/src/TimeZoneOffset.php +++ b/src/TimeZoneOffset.php @@ -29,8 +29,9 @@ final class TimeZoneOffset extends TimeZone * * @param int $totalSeconds The total offset in seconds, validated from -64800 to +64800. */ - private function __construct(private readonly int $totalSeconds) - { + private function __construct( + private readonly int $totalSeconds + ) { } /** diff --git a/src/TimeZoneRegion.php b/src/TimeZoneRegion.php index 2324ab3..bb0d2db 100644 --- a/src/TimeZoneRegion.php +++ b/src/TimeZoneRegion.php @@ -20,8 +20,9 @@ final class TimeZoneRegion extends TimeZone /** * Private constructor. Use a factory method to obtain an instance. */ - private function __construct(private readonly DateTimeZone $zone) - { + private function __construct( + private readonly DateTimeZone $zone + ) { } /** diff --git a/src/Year.php b/src/Year.php index 7125ce8..4a5663f 100644 --- a/src/Year.php +++ b/src/Year.php @@ -29,8 +29,9 @@ final class Year implements JsonSerializable, Stringable /** * @param int $year The year, validated. */ - private function __construct(private readonly int $year) - { + private function __construct( + private readonly int $year + ) { } /**