summaryrefslogtreecommitdiffstats
path: root/lib/private/Notification/Manager.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-10 14:12:10 +0200
committerJoas Schilling <coding@schilljs.com>2019-07-15 15:12:40 +0200
commit9b288cda6daf0ab82a910b3442fcc0e003471741 (patch)
tree9f20504c3eed2f5ca1a63bf135dea47943b100e6 /lib/private/Notification/Manager.php
parentc048c56411d86a3f8509ddae66743d4f189f2deb (diff)
downloadnextcloud-server-9b288cda6daf0ab82a910b3442fcc0e003471741.tar.gz
nextcloud-server-9b288cda6daf0ab82a910b3442fcc0e003471741.zip
Make all interfaces strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Notification/Manager.php')
-rw-r--r--lib/private/Notification/Manager.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index 4c3f7a2453c..876a191fb9e 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -56,11 +57,6 @@ class Manager implements IManager {
/** @var bool */
protected $preparingPushNotification;
- /**
- * Manager constructor.
- *
- * @param IValidator $validator
- */
public function __construct(IValidator $validator) {
$this->validator = $validator;
$this->apps = [];
@@ -179,7 +175,7 @@ class Manager implements IManager {
* @param bool $preparingPushNotification
* @since 14.0.0
*/
- public function setPreparingPushNotification($preparingPushNotification) {
+ public function setPreparingPushNotification(bool $preparingPushNotification): void {
$this->preparingPushNotification = $preparingPushNotification;
}
@@ -196,7 +192,7 @@ class Manager implements IManager {
* @throws \InvalidArgumentException When the notification is not valid
* @since 8.2.0
*/
- public function notify(INotification $notification) {
+ public function notify(INotification $notification): void {
if (!$notification->isValid()) {
throw new \InvalidArgumentException('The given notification is invalid');
}
@@ -218,7 +214,7 @@ class Manager implements IManager {
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
* @since 8.2.0
*/
- public function prepare(INotification $notification, $languageCode): INotification {
+ public function prepare(INotification $notification, string $languageCode): INotification {
$notifiers = $this->getNotifiers();
foreach ($notifiers as $notifier) {
@@ -243,7 +239,7 @@ class Manager implements IManager {
/**
* @param INotification $notification
*/
- public function markProcessed(INotification $notification) {
+ public function markProcessed(INotification $notification): void {
$apps = $this->getApps();
foreach ($apps as $app) {