mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 03:14:32 +02:00
Use typed properties
This commit is contained in:
parent
548ec2ea50
commit
51e05a8669
216 changed files with 603 additions and 698 deletions
|
@ -27,7 +27,7 @@ class EventCommentHelper
|
|||
{
|
||||
protected const MAX_MESSAGE_LENGTH = 255;
|
||||
|
||||
protected $message;
|
||||
protected ?string $message;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue