@@ -254,7 +254,7 @@ protected function createShareActivity(IShare $share, string $type = 'share') {
254254 [$ userFolder ->getRelativePath ($ share ->getNode ()->getPath ()), $ share ->getSharedWith ()],
255255 $ share ->getSharedBy (),
256256 $ share ->getNode ()->getId (),
257- $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
257+ ( string ) $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
258258 );
259259
260260 if ($ share ->getShareOwner () !== $ share ->getSharedBy ()) {
@@ -264,11 +264,10 @@ protected function createShareActivity(IShare $share, string $type = 'share') {
264264 $ ownerPath = $ nodes [0 ]->getPath ();
265265 $ this ->publishActivity (
266266 $ type === 'share ' ? Activity::SUBJECT_SHARED_EMAIL_BY : Activity::SUBJECT_UNSHARED_EMAIL_BY ,
267- Activity::SUBJECT_SHARED_EMAIL_BY ,
268267 [$ ownerFolder ->getRelativePath ($ ownerPath ), $ share ->getSharedWith (), $ share ->getSharedBy ()],
269268 $ share ->getShareOwner (),
270269 $ fileId ,
271- $ ownerFolder ->getRelativePath ($ ownerPath )
270+ ( string ) $ ownerFolder ->getRelativePath ($ ownerPath )
272271 );
273272 }
274273
@@ -291,15 +290,15 @@ protected function createPasswordSendActivity(IShare $share, $sharedWith, $sendT
291290 [$ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())],
292291 $ share ->getSharedBy (),
293292 $ share ->getNode ()->getId (),
294- $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
293+ ( string ) $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
295294 );
296295 } else {
297296 $ this ->publishActivity (
298297 Activity::SUBJECT_SHARED_EMAIL_PASSWORD_SEND ,
299298 [$ userFolder ->getRelativePath ($ share ->getNode ()->getPath ()), $ sharedWith ],
300299 $ share ->getSharedBy (),
301300 $ share ->getNode ()->getId (),
302- $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
301+ ( string ) $ userFolder ->getRelativePath ($ share ->getNode ()->getPath ())
303302 );
304303 }
305304 }
@@ -308,13 +307,13 @@ protected function createPasswordSendActivity(IShare $share, $sharedWith, $sendT
308307 /**
309308 * publish activity if a file/folder was shared by mail
310309 *
311- * @param $subject
312- * @param $parameters
313- * @param $affectedUser
314- * @param $fileId
315- * @param $filePath
310+ * @param string $subject
311+ * @param array $parameters
312+ * @param string $affectedUser
313+ * @param int $fileId
314+ * @param string $filePath
316315 */
317- protected function publishActivity ($ subject , $ parameters , $ affectedUser , $ fileId , $ filePath ) {
316+ protected function publishActivity (string $ subject , array $ parameters , string $ affectedUser , int $ fileId , string $ filePath ) {
318317 $ event = $ this ->activityManager ->generateEvent ();
319318 $ event ->setApp ('sharebymail ' )
320319 ->setType ('shared ' )
0 commit comments