Added declare strict types to all files

This commit is contained in:
Jan Böhmer 2023-06-11 18:59:07 +02:00
parent bea90a7d94
commit 6a2ff9d153
196 changed files with 685 additions and 360 deletions

View file

@ -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\Entity\LogSystem;
use App\Entity\Parts\PartLot;
@ -64,7 +66,7 @@ class PartStockChangedLogEntry extends AbstractLogEntry
'n' => $new_stock,
'p' => $new_total_part_instock,
]);
if (!empty($comment)) {
if ($comment !== '') {
$this->extra['c'] = mb_strimwidth($comment, 0, self::COMMENT_MAX_LENGTH, '...');
}
@ -201,4 +203,4 @@ class PartStockChangedLogEntry extends AbstractLogEntry
default => throw new \InvalidArgumentException('Invalid short type: '.$short_type),
};
}
}
}