diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 15:47:59 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 15:47:59 +0100 |
commit | 24b58a76831b5183c6daafef32a1a6e333afa877 (patch) | |
tree | 920e9df0b600fa11fbec0e7976673d30403cc961 /apps/provisioning_api/lib/Controller/GroupsController.php | |
parent | 640db3d5fed6ca6d274d64842100fa7216ae1d67 (diff) | |
download | nextcloud-server-24b58a76831b5183c6daafef32a1a6e333afa877.tar.gz nextcloud-server-24b58a76831b5183c6daafef32a1a6e333afa877.zip |
Make the provisioning api app strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/GroupsController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index cb237d9791f..8aed50bf049 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -56,7 +57,7 @@ class GroupsController extends OCSController { * @param ILogger $logger */ public function __construct( - $appName, + string $appName, IRequest $request, IGroupManager $groupManager, IUserSession $userSession, @@ -78,7 +79,7 @@ class GroupsController extends OCSController { * @param int $offset * @return DataResponse */ - public function getGroups($search = '', $limit = null, $offset = null) { + public function getGroups(string $search = '', $limit = null, $offset = null): DataResponse { if ($limit !== null) { $limit = (int)$limit; } @@ -104,7 +105,7 @@ class GroupsController extends OCSController { * @return DataResponse * @throws OCSException */ - public function getGroup($groupId) { + public function getGroup(string $groupId): DataResponse { $user = $this->userSession->getUser(); // Check the group exists @@ -142,7 +143,7 @@ class GroupsController extends OCSController { * @return DataResponse * @throws OCSException */ - public function addGroup($groupid) { + public function addGroup(string $groupid): DataResponse { // Validate name if(empty($groupid)) { $this->logger->error('Group name not supplied', ['app' => 'provisioning_api']); @@ -163,7 +164,7 @@ class GroupsController extends OCSController { * @return DataResponse * @throws OCSException */ - public function deleteGroup($groupId) { + public function deleteGroup(string $groupId): DataResponse { // Check it exists if(!$this->groupManager->groupExists($groupId)){ throw new OCSException('', 101); @@ -180,7 +181,7 @@ class GroupsController extends OCSController { * @return DataResponse * @throws OCSException */ - public function getSubAdminsOfGroup($groupId) { + public function getSubAdminsOfGroup(string $groupId): DataResponse { // Check group exists $targetGroup = $this->groupManager->get($groupId); if($targetGroup === null) { |