diff --git a/lib/Db/Share.php b/lib/Db/Share.php index f71ded76f..0a5772fd9 100644 --- a/lib/Db/Share.php +++ b/lib/Db/Share.php @@ -69,7 +69,7 @@ class Share extends Entity implements JsonSerializable { public const TYPE_CIRCLE = 'circle'; public const TYPE_CONTACTGROUP = 'contactGroup'; - public const TYPE_SORT_ARRAY = array( + public const TYPE_SORT_ARRAY = [ self::TYPE_PUBLIC, self::TYPE_ADMIN, self::TYPE_GROUP, @@ -79,7 +79,7 @@ class Share extends Entity implements JsonSerializable { self::TYPE_EXTERNAL, self::TYPE_CIRCLE, self::TYPE_CONTACTGROUP, - ); + ]; /** @var string $token */ protected $token = ''; diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index a5891cc54..1c1dab1e4 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -134,7 +134,7 @@ class ShareService { private function sortByCategory() : void { $sortedShares = []; foreach (Share::TYPE_SORT_ARRAY as $shareType) { - $filteredShares = array_filter($this->shares, function($share) use ($shareType) { + $filteredShares = array_filter($this->shares, function ($share) use ($shareType) { return $share->getType() === $shareType; }); $sortedShares = array_merge($sortedShares, $filteredShares);