mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -63,25 +63,19 @@ class RollingDate
|
||||
|
||||
public const T_YEAR_PREVIOUS_START = 'year_previous_start';
|
||||
|
||||
private ?DateTimeImmutable $fixedDate;
|
||||
|
||||
/**
|
||||
* The pivot date is the date from the rolling is computed. By default, it is "now".
|
||||
*/
|
||||
private DateTimeImmutable $pivotDate;
|
||||
|
||||
private string $roll;
|
||||
|
||||
/**
|
||||
* @param string|self::T_* $roll
|
||||
* @param DateTimeImmutable|null $pivotDate Will be "now" if null is given
|
||||
* @param DateTimeImmutable|null $fixedDate Only to insert if $roll equals @see{self::T_FIXED_DATE}
|
||||
*/
|
||||
public function __construct(string $roll, ?DateTimeImmutable $fixedDate = null, ?DateTimeImmutable $pivotDate = null)
|
||||
public function __construct(private string $roll, private ?\DateTimeImmutable $fixedDate = null, ?DateTimeImmutable $pivotDate = null)
|
||||
{
|
||||
$this->roll = $roll;
|
||||
$this->pivotDate = $pivotDate ?? new DateTimeImmutable('now');
|
||||
$this->fixedDate = $fixedDate;
|
||||
}
|
||||
|
||||
public function getFixedDate(): ?DateTimeImmutable
|
||||
|
Reference in New Issue
Block a user