aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-01-04 13:42:22 -0100
committerGitHub <noreply@github.com>2024-01-04 13:42:22 -0100
commit2d327fc813bc44eafc5b50d49dd3e143ea1972fe (patch)
tree1698c134c69afcc8a57a7aebc44875dbe19d7805
parent2ab852e04f434f18a036b078a6cc90aa862aff26 (diff)
parent71bdda42e4da0d8e7b4c58827faa54f0852c4296 (diff)
downloadnextcloud-server-2d327fc813bc44eafc5b50d49dd3e143ea1972fe.tar.gz
nextcloud-server-2d327fc813bc44eafc5b50d49dd3e143ea1972fe.zip
Merge pull request #42578 from nextcloud/fix/tests/notification-test
initialize variables
-rw-r--r--lib/private/Notification/Notification.php78
1 files changed, 20 insertions, 58 deletions
diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php
index 9222f3cb0e3..ed2a84b0de2 100644
--- a/lib/private/Notification/Notification.php
+++ b/lib/private/Notification/Notification.php
@@ -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 = [];
}
/**