Release 2.20.0 (#4987)

This commit is contained in:
Kevin Papst
2024-08-04 18:22:27 +02:00
committed by GitHub
parent 0947b88d36
commit ff6a3e8262
101 changed files with 441 additions and 458 deletions

View File

@@ -130,6 +130,6 @@ abstract class AbstractWidget implements WidgetInterface
{
$name = (new \ReflectionClass($this))->getShortName();
return sprintf('widget/widget-%s.html.twig', strtolower($name));
return \sprintf('widget/widget-%s.html.twig', strtolower($name));
}
}

View File

@@ -128,8 +128,8 @@ final class PaginatedWorkingTimeChart extends AbstractWidget
$monthBegin = (clone $weekBegin)->setDate((int) $weekBegin->format('Y'), (int) $weekBegin->format('n'), 1)->setTime(0, 0, 0);
$monthEnd = (clone $weekBegin)->setDate((int) $weekBegin->format('Y'), (int) $weekBegin->format('n'), (int) $weekBegin->format('t'))->setTime(23, 59, 59);
$yearBegin = $dateTimeFactory->createDateTime(sprintf('01 january %s 00:00:00', $year));
$yearEnd = $dateTimeFactory->createDateTime(sprintf('31 december %s 23:59:59', $year));
$yearBegin = $dateTimeFactory->createDateTime(\sprintf('01 january %s 00:00:00', $year));
$yearEnd = $dateTimeFactory->createDateTime(\sprintf('31 december %s 23:59:59', $year));
$yearData = $this->repository->getDurationForTimeRange($yearBegin, $yearEnd, $user);
$financialYearData = null;

View File

@@ -41,7 +41,7 @@ class WidgetService
public function getWidget(string $id): WidgetInterface
{
if (!$this->hasWidget($id)) {
throw new \InvalidArgumentException(sprintf('Cannot find widget: %s', $id));
throw new \InvalidArgumentException(\sprintf('Cannot find widget: %s', $id));
}
return $this->widgets[$id];