mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-11 19:04:31 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -48,13 +48,9 @@ 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 TranslatorInterface $translator;
|
||||
protected ElementTypeNameGenerator $elementTypeNameGenerator;
|
||||
|
||||
public function __construct(TranslatorInterface $translator, ElementTypeNameGenerator $elementTypeNameGenerator)
|
||||
public function __construct(protected TranslatorInterface $translator, protected ElementTypeNameGenerator $elementTypeNameGenerator)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
$this->elementTypeNameGenerator = $elementTypeNameGenerator;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,7 +159,7 @@ class LogEntryExtraFormatter
|
|||
'%s <i class="fas fa-long-arrow-alt-right"></i> %s (%s)',
|
||||
$context->getOldInstock(),
|
||||
$context->getNewInstock(),
|
||||
(!$context->isWithdrawal() ? '+' : '-').$context->getDifference(true)
|
||||
($context->isWithdrawal() ? '-' : '+').$context->getDifference(true)
|
||||
);
|
||||
$array['log.instock_changed.comment'] = htmlspecialchars($context->getComment());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue