private function getSharedWithMe() { $userShares = $this->shareManager->getSharedWith($this->currentUser, \OCP\Share::SHARE_TYPE_USER, -1, 0); $groupShares = $this->shareManager->getSharedWith($this->currentUser, \OCP\Share::SHARE_TYPE_GROUP, -1, 0); $shares = array_merge($userShares, $groupShares); $formatted = []; foreach ($shares as $share) { $formatted[] = $this->formatShare($share); } return new \OC_OCS_Result($formatted); }