phpstan fixes

This commit is contained in:
Clemens Schwaighofer
2025-04-01 11:22:59 +09:00
parent b302fb4053
commit cf1989819a
5 changed files with 35 additions and 32 deletions

View File

@@ -737,10 +737,10 @@ class DateTime
$exclude_start_date
);
return [
$values[0],
$values[1],
$values[2],
$values[3],
$values[0] ?? 0,
$values[1] ?? 0,
$values[2] ?? 0,
$values[3] ?? false,
];
}
@@ -767,10 +767,10 @@ class DateTime
$exclude_start_date
);
return [
'overall' => $values['overall'],
'weekday' => $values['weekday'],
'weekend' => $values['weekend'],
'reverse' => $values['reverse'],
'overall' => $values['overall'] ?? 0,
'weekday' => $values['weekday'] ?? 0,
'weekend' => $values['weekend'] ?? 0,
'reverse' => $values['reverse'] ?? false,
];
}

View File

@@ -418,9 +418,7 @@ class ProgressBar
// if this is percent, we ignore anything, it is auto positioned
if ($this->label[$name]['type'] != 'percent') {
foreach (['top', 'left', 'width', 'height'] as $pos_name) {
if ($$pos_name !== false) {
$this->label[$name][$pos_name] = intval($$pos_name);
}
$this->label[$name][$pos_name] = intval($$pos_name);
}
if ($align != '') {