Korrigiere PHP-Hinweise

This commit is contained in:
2025-06-16 15:36:27 +02:00
parent a09edcae25
commit d52a9d77ab
7 changed files with 23 additions and 33 deletions
+7 -16
View File
@@ -10,24 +10,14 @@ use JetBrains\PhpStorm\ArrayShape;
class WorkingHoursView implements ModelInterface
{
protected DateTimeInterface $period;
protected PeriodDesignationEnum $periodDesignation;
protected int $workingDays;
protected DateInterval $totalHours;
protected DateInterval $overtime;
public function __construct(
DateTimeInterface $period,
PeriodDesignationEnum $periodDesignation,
int $workingDays,
DateInterval $totalHours,
DateInterval $overtime
protected DateTimeInterface $period,
protected PeriodDesignationEnum $periodDesignation,
protected int $workingDays,
protected DateInterval $totalHours,
protected DateInterval $overtime
) {
$this->period = $period;
$this->periodDesignation = $periodDesignation;
$this->workingDays = $workingDays;
$this->totalHours = $totalHours;
$this->overtime = $overtime;
}
public function getPeriod(): DateTimeInterface
@@ -66,7 +56,8 @@ class WorkingHoursView implements ModelInterface
'totalHours' => "string",
'workingDays' => "int",
'overtime' => "string"
])] public function jsonSerialize(): array
])]
public function jsonSerialize(): array
{
$formatOvertime = (($this->getOvertime()->invert === 1) ? '-' : '') . '%H:%I:%S';
return [