mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 20:04:34 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -17,7 +20,6 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace App\Services\LogSystem;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
|
|
@ -135,7 +135,7 @@ class LogEntryExtraFormatter
|
|||
}
|
||||
|
||||
if ($context instanceof LogWithCommentInterface && $context->hasComment()) {
|
||||
$array[] = htmlspecialchars($context->getComment());
|
||||
$array[] = htmlspecialchars((string) $context->getComment());
|
||||
}
|
||||
|
||||
if ($context instanceof ElementCreatedLogEntry && $context->hasCreationInstockValue()) {
|
||||
|
@ -193,7 +193,7 @@ class LogEntryExtraFormatter
|
|||
htmlspecialchars($this->elementTypeNameGenerator->getLocalizedTypeLabel(PartLot::class))
|
||||
.' ' . $context->getMoveToTargetID();
|
||||
}
|
||||
if ($context->getActionTimestamp()) {
|
||||
if ($context->getActionTimestamp() !== null) {
|
||||
$formatter = new \IntlDateFormatter($this->translator->getLocale(), \IntlDateFormatter::SHORT, \IntlDateFormatter::SHORT);
|
||||
$array['log.part_stock_changed.timestamp'] = $formatter->format($context->getActionTimestamp());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue