File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11<?php
2+ declare (strict_types = 1 );
23/**
34 * @copyright Copyright (c) 2016, ownCloud, Inc.
45 *
@@ -133,7 +134,7 @@ public function __construct(IValidator $richValidator) {
133134 * @throws \InvalidArgumentException if the app id is invalid
134135 * @since 8.2.0
135136 */
136- public function setApp ($ app ) {
137+ public function setApp (string $ app ) {
137138 if (!is_string ($ app ) || $ app === '' || isset ($ app [32 ])) {
138139 throw new \InvalidArgumentException ('The given app name is invalid ' );
139140 }
@@ -155,7 +156,7 @@ public function getApp() {
155156 * @throws \InvalidArgumentException if the user id is invalid
156157 * @since 8.2.0
157158 */
158- public function setUser ($ user ) {
159+ public function setUser (string $ user ) {
159160 if (!is_string ($ user ) || $ user === '' || isset ($ user [64 ])) {
160161 throw new \InvalidArgumentException ('The given user id is invalid ' );
161162 }
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ private function sendNotification(): void {
196196
197197 $ users = array_keys ($ this ->userToNotify );
198198 foreach ($ users as $ user ) {
199- $ notification ->setUser ($ user );
199+ $ notification ->setUser (( string ) $ user );
200200 $ this ->notificationManager ->notify ($ notification );
201201 }
202202 }
Original file line number Diff line number Diff line change 11<?php
2+ declare (strict_types = 1 );
23/**
34 * @copyright Copyright (c) 2016, ownCloud, Inc.
45 *
@@ -36,7 +37,7 @@ interface INotification {
3637 * @throws \InvalidArgumentException if the app id is invalid
3738 * @since 9.0.0
3839 */
39- public function setApp ($ app );
40+ public function setApp (string $ app );
4041
4142 /**
4243 * @return string
@@ -50,7 +51,7 @@ public function getApp();
5051 * @throws \InvalidArgumentException if the user id is invalid
5152 * @since 9.0.0
5253 */
53- public function setUser ($ user );
54+ public function setUser (string $ user );
5455
5556 /**
5657 * @return string
You can’t perform that action at this time.
0 commit comments