@@ -32,12 +32,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
3232 public const SHARETYPES_PROPERTYNAME = '{http://owncloud.org/ns}share-types ' ;
3333 public const SHAREES_PROPERTYNAME = '{http://nextcloud.org/ns}sharees ' ;
3434
35- /**
36- * Reference to main server object
37- *
38- * @var \Sabre\DAV\Server
39- */
40- private $ server ;
35+ private \Sabre \DAV \Server $ server ;
4136 private string $ userId ;
4237
4338 /** @var IShare[][] */
@@ -54,8 +49,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
5449
5550 public function __construct (
5651 private Tree $ tree ,
57- private IUserSession $ userSession ,
58- private Folder $ userFolder ,
52+ IUserSession $ userSession ,
5953 private IManager $ shareManager ,
6054 ) {
6155 $ this ->userId = $ userSession ->getUser ()->getUID ();
@@ -206,10 +200,7 @@ public function handleGetProperties(
206200
207201 $ propFind ->handle (self ::SHARETYPES_PROPERTYNAME , function () use ($ sabreNode ): ShareTypeList {
208202 $ shares = $ this ->getShares ($ sabreNode );
209-
210- $ shareTypes = array_unique (array_map (function (IShare $ share ) {
211- return $ share ->getShareType ();
212- }, $ shares ));
203+ $ shareTypes = array_unique (array_map (static fn (IShare $ share ): int => $ share ->getShareType (), $ shares ));
213204
214205 return new ShareTypeList ($ shareTypes );
215206 });
0 commit comments