Release 2.0.13 (#3955)
- added missing escape to prevent HTML injection - added missing color attribute - upgrade theme - use dropdown submenu if title is set, otherwise dropdown tends to get too long - allow to use card-table instead of card-body - added `required` attribute to username and password field - fix pagination back to page 1 - prevent tag name too long - re-add missing user preferences link
This commit is contained in:
@@ -11,7 +11,6 @@ namespace App\Model;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Model\Statistic\StatisticDate;
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
|
||||
final class DailyStatistic implements DateStatisticInterface
|
||||
@@ -19,16 +18,14 @@ final class DailyStatistic implements DateStatisticInterface
|
||||
/**
|
||||
* @var array<string, StatisticDate>
|
||||
*/
|
||||
private $days = [];
|
||||
private $begin;
|
||||
private $end;
|
||||
private $user;
|
||||
private array $days = [];
|
||||
private DateTimeInterface $begin;
|
||||
private DateTimeInterface $end;
|
||||
|
||||
public function __construct(DateTime $begin, DateTime $end, User $user)
|
||||
public function __construct(DateTimeInterface $begin, DateTimeInterface $end, private User $user)
|
||||
{
|
||||
$this->begin = clone $begin;
|
||||
$this->end = clone $end;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
public function getUser(): User
|
||||
@@ -42,7 +39,7 @@ final class DailyStatistic implements DateStatisticInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$tmp = clone $this->begin;
|
||||
$tmp = \DateTime::createFromInterface($this->begin);
|
||||
$tmp->setTime(0, 0, 0);
|
||||
while ($tmp < $this->end) {
|
||||
$id = $tmp->format('Y-m-d');
|
||||
|
||||
Reference in New Issue
Block a user