Korrigiere PHP-Hinweise
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user