]> source.dussan.org Git - nextcloud-server.git/commitdiff
initialize variables 42578/head
authorMaxence Lange <maxence@artificial-owl.com>
Thu, 4 Jan 2024 11:59:03 +0000 (10:59 -0100)
committerMaxence Lange <maxence@artificial-owl.com>
Thu, 4 Jan 2024 11:59:22 +0000 (10:59 -0100)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
lib/private/Notification/Notification.php

index 9222f3cb0e36028f224746c078aff7c17b6de0a2..ed2a84b0de2f8d66364ac1731b2f6332abe958cf 100644 (file)
@@ -32,71 +32,33 @@ use OCP\RichObjectStrings\InvalidObjectExeption;
 use OCP\RichObjectStrings\IValidator;
 
 class Notification implements INotification {
-       protected string $app;
-
-       protected string $user;
-
+       protected string $app = '';
+       protected string $user = '';
        protected \DateTime $dateTime;
-
-       protected string $objectType;
-
-       protected string $objectId;
-
-       protected string $subject;
-
-       protected array $subjectParameters;
-
-       protected string $subjectParsed;
-
-       protected string $subjectRich;
-
-       protected array $subjectRichParameters;
-
-       protected string $message;
-
-       protected array $messageParameters;
-
-       protected string $messageParsed;
-
-       protected string $messageRich;
-
-       protected array $messageRichParameters;
-
-       protected string $link;
-
-       protected string $icon;
-
-       protected array $actions;
-
-       protected array $actionsParsed;
-
-       protected bool $hasPrimaryAction;
-
-       protected bool $hasPrimaryParsedAction;
+       protected string $objectType = '';
+       protected string $objectId = '';
+       protected string $subject = '';
+       protected array $subjectParameters = [];
+       protected string $subjectParsed = '';
+       protected string $subjectRich = '';
+       protected array $subjectRichParameters = [];
+       protected string $message = '';
+       protected array $messageParameters = [];
+       protected string $messageParsed = '';
+       protected string $messageRich = '';
+       protected array $messageRichParameters = [];
+       protected string $link = '';
+       protected string $icon = '';
+       protected array $actions = [];
+       protected array $actionsParsed = [];
+       protected bool $hasPrimaryAction = false;
+       protected bool $hasPrimaryParsedAction = false;
 
        public function __construct(
                protected IValidator $richValidator,
        ) {
-               $this->app = '';
-               $this->user = '';
                $this->dateTime = new \DateTime();
                $this->dateTime->setTimestamp(0);
-               $this->objectType = '';
-               $this->objectId = '';
-               $this->subject = '';
-               $this->subjectParameters = [];
-               $this->subjectParsed = '';
-               $this->subjectRich = '';
-               $this->subjectRichParameters = [];
-               $this->message = '';
-               $this->messageParameters = [];
-               $this->messageParsed = '';
-               $this->messageRich = '';
-               $this->messageRichParameters = [];
-               $this->link = '';
-               $this->icon = '';
-               $this->actions = [];
-               $this->actionsParsed = [];
        }
 
        /**