Skip to content

Commit 2d327fc

Browse files
Merge pull request #42578 from nextcloud/fix/tests/notification-test
initialize variables
2 parents 2ab852e + 71bdda4 commit 2d327fc

1 file changed

Lines changed: 20 additions & 58 deletions

File tree

lib/private/Notification/Notification.php

Lines changed: 20 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -32,71 +32,33 @@
3232
use OCP\RichObjectStrings\IValidator;
3333

3434
class Notification implements INotification {
35-
protected string $app;
36-
37-
protected string $user;
38-
35+
protected string $app = '';
36+
protected string $user = '';
3937
protected \DateTime $dateTime;
40-
41-
protected string $objectType;
42-
43-
protected string $objectId;
44-
45-
protected string $subject;
46-
47-
protected array $subjectParameters;
48-
49-
protected string $subjectParsed;
50-
51-
protected string $subjectRich;
52-
53-
protected array $subjectRichParameters;
54-
55-
protected string $message;
56-
57-
protected array $messageParameters;
58-
59-
protected string $messageParsed;
60-
61-
protected string $messageRich;
62-
63-
protected array $messageRichParameters;
64-
65-
protected string $link;
66-
67-
protected string $icon;
68-
69-
protected array $actions;
70-
71-
protected array $actionsParsed;
72-
73-
protected bool $hasPrimaryAction;
74-
75-
protected bool $hasPrimaryParsedAction;
38+
protected string $objectType = '';
39+
protected string $objectId = '';
40+
protected string $subject = '';
41+
protected array $subjectParameters = [];
42+
protected string $subjectParsed = '';
43+
protected string $subjectRich = '';
44+
protected array $subjectRichParameters = [];
45+
protected string $message = '';
46+
protected array $messageParameters = [];
47+
protected string $messageParsed = '';
48+
protected string $messageRich = '';
49+
protected array $messageRichParameters = [];
50+
protected string $link = '';
51+
protected string $icon = '';
52+
protected array $actions = [];
53+
protected array $actionsParsed = [];
54+
protected bool $hasPrimaryAction = false;
55+
protected bool $hasPrimaryParsedAction = false;
7656

7757
public function __construct(
7858
protected IValidator $richValidator,
7959
) {
80-
$this->app = '';
81-
$this->user = '';
8260
$this->dateTime = new \DateTime();
8361
$this->dateTime->setTimestamp(0);
84-
$this->objectType = '';
85-
$this->objectId = '';
86-
$this->subject = '';
87-
$this->subjectParameters = [];
88-
$this->subjectParsed = '';
89-
$this->subjectRich = '';
90-
$this->subjectRichParameters = [];
91-
$this->message = '';
92-
$this->messageParameters = [];
93-
$this->messageParsed = '';
94-
$this->messageRich = '';
95-
$this->messageRichParameters = [];
96-
$this->link = '';
97-
$this->icon = '';
98-
$this->actions = [];
99-
$this->actionsParsed = [];
10062
}
10163

10264
/**

0 commit comments

Comments
 (0)