Use typed properties

This commit is contained in:
Jan Böhmer 2022-09-18 22:59:31 +02:00
parent 548ec2ea50
commit 51e05a8669
216 changed files with 603 additions and 698 deletions

View file

@ -27,7 +27,7 @@ class EventCommentHelper
{
protected const MAX_MESSAGE_LENGTH = 255;
protected $message;
protected ?string $message;
public function __construct()
{

View file

@ -49,11 +49,11 @@ use Symfony\Component\Security\Core\Security;
class EventLogger
{
protected $minimum_log_level;
protected $blacklist;
protected $whitelist;
protected $em;
protected $security;
protected int $minimum_log_level;
protected array $blacklist;
protected array $whitelist;
protected EntityManagerInterface $em;
protected Security $security;
public function __construct(int $minimum_log_level, array $blacklist, array $whitelist, EntityManagerInterface $em, Security $security)
{

View file

@ -33,8 +33,8 @@ class EventUndoHelper
protected const ALLOWED_MODES = [self::MODE_REVERT, self::MODE_UNDO];
protected $undone_event;
protected $mode;
protected ?AbstractLogEntry $undone_event;
protected string $mode;
public function __construct()
{

View file

@ -66,8 +66,8 @@ class LogEntryExtraFormatter
{
protected const CONSOLE_SEARCH = ['<i class="fas fa-long-arrow-alt-right"></i>', '<i>', '</i>', '<b>', '</b>'];
protected const CONSOLE_REPLACE = ['→', '<info>', '</info>', '<error>', '</error>'];
protected $translator;
protected $elementTypeNameGenerator;
protected TranslatorInterface $translator;
protected ElementTypeNameGenerator $elementTypeNameGenerator;
public function __construct(TranslatorInterface $translator, ElementTypeNameGenerator $elementTypeNameGenerator)
{

View file

@ -32,6 +32,7 @@ use App\Entity\Contracts\TimeTravelInterface;
use App\Entity\LogSystem\AbstractLogEntry;
use App\Entity\LogSystem\CollectionElementDeleted;
use App\Entity\LogSystem\ElementEditedLogEntry;
use App\Repository\LogEntryRepository;
use Brick\Math\BigDecimal;
use DateTime;
use Doctrine\Common\Collections\Collection;
@ -44,8 +45,8 @@ use ReflectionClass;
class TimeTravel
{
protected $em;
protected $repo;
protected EntityManagerInterface $em;
protected LogEntryRepository $repo;
public function __construct(EntityManagerInterface $em)
{