mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 20:04:34 +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
|
@ -45,11 +45,10 @@ class EventCommentHelper
|
|||
{
|
||||
protected const MAX_MESSAGE_LENGTH = 255;
|
||||
|
||||
protected ?string $message;
|
||||
protected ?string $message = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->message = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -60,11 +59,7 @@ class EventCommentHelper
|
|||
public function setMessage(?string $message): void
|
||||
{
|
||||
//Restrict the length of the string
|
||||
if ($message) {
|
||||
$this->message = mb_strimwidth($message, 0, self::MAX_MESSAGE_LENGTH, '...');
|
||||
} else {
|
||||
$this->message = null;
|
||||
}
|
||||
$this->message = $message ? mb_strimwidth($message, 0, self::MAX_MESSAGE_LENGTH, '...') : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue