diff --git a/src/Controller/Api/GroupController.php b/src/Controller/Api/GroupController.php index 88a54eb33..821c0be23 100644 --- a/src/Controller/Api/GroupController.php +++ b/src/Controller/Api/GroupController.php @@ -100,7 +100,7 @@ public function getGroupsAction(ParamFetcherInterface $paramFetcher) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="group id"} + * {"name"="id", "dataType"="string", "description"="Group identifier"} * }, * output={"class"="FOS\UserBundle\Model\GroupInterface", "groups"={"sonata_api_read"}}, * statusCodes={ @@ -111,7 +111,7 @@ public function getGroupsAction(ParamFetcherInterface $paramFetcher) * * @View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true) * - * @param $id + * @param string $id * * @return GroupInterface */ @@ -148,7 +148,7 @@ public function postGroupAction(Request $request) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="group identifier"} + * {"name"="id", "dataType"="string", "description"="Group identifier"} * }, * input={"class"="sonata_user_api_form_group", "name"="", "groups"={"sonata_api_write"}}, * output={"class"="Sonata\UserBundle\Model\Group", "groups"={"sonata_api_read"}}, @@ -159,7 +159,7 @@ public function postGroupAction(Request $request) * } * ) * - * @param int $id Group identifier + * @param string $id Group identifier * @param Request $request A Symfony request * * @throws NotFoundHttpException @@ -176,7 +176,7 @@ public function putGroupAction($id, Request $request) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="group identifier"} + * {"name"="id", "dataType"="string", "description"="Group identifier"} * }, * statusCodes={ * 200="Returned when group is successfully deleted", @@ -185,7 +185,7 @@ public function putGroupAction($id, Request $request) * } * ) * - * @param int $id A Group identifier + * @param string $id A Group identifier * * @throws NotFoundHttpException * @@ -203,8 +203,8 @@ public function deleteGroupAction($id) /** * Write a Group, this method is used by both POST and PUT action methods. * - * @param Request $request Symfony request - * @param int|null $id A Group identifier + * @param Request $request Symfony request + * @param string|null $id A Group identifier * * @return FormInterface */ @@ -239,7 +239,7 @@ protected function handleWriteGroup($request, $id = null) /** * Retrieves group with id $id or throws an exception if it doesn't exist. * - * @param $id + * @param string $id * * @throws NotFoundHttpException * diff --git a/src/Controller/Api/UserController.php b/src/Controller/Api/UserController.php index ac83d887f..cd59a67b1 100644 --- a/src/Controller/Api/UserController.php +++ b/src/Controller/Api/UserController.php @@ -104,7 +104,7 @@ public function getUsersAction(ParamFetcherInterface $paramFetcher) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="user id"} + * {"name"="id", "dataType"="string", "description"="User identifier"} * }, * output={"class"="Sonata\UserBundle\Model\UserInterface", "groups"={"sonata_api_read"}}, * statusCodes={ @@ -115,7 +115,7 @@ public function getUsersAction(ParamFetcherInterface $paramFetcher) * * @View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true) * - * @param $id + * @param string $id * * @return UserInterface */ @@ -152,7 +152,7 @@ public function postUserAction(Request $request) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="user identifier"} + * {"name"="id", "dataType"="string", "description"="User identifier"} * }, * input={"class"="sonata_user_api_form_user", "name"="", "groups"={"sonata_api_write"}}, * output={"class"="Sonata\UserBundle\Model\User", "groups"={"sonata_api_read"}}, @@ -163,7 +163,7 @@ public function postUserAction(Request $request) * } * ) * - * @param int $id User id + * @param string $id User id * @param Request $request A Symfony request * * @throws NotFoundHttpException @@ -180,7 +180,7 @@ public function putUserAction($id, Request $request) * * @ApiDoc( * requirements={ - * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="user identifier"} + * {"name"="id", "dataType"="string", "description"="User identifier"} * }, * statusCodes={ * 200="Returned when user is successfully deleted", @@ -189,7 +189,7 @@ public function putUserAction($id, Request $request) * } * ) * - * @param int $id An User identifier + * @param string $id An User identifier * * @throws NotFoundHttpException * @@ -209,8 +209,8 @@ public function deleteUserAction($id) * * @ApiDoc( * requirements={ - * {"name"="userId", "dataType"="integer", "requirement"="\d+", "description"="user identifier"}, - * {"name"="groupId", "dataType"="integer", "requirement"="\d+", "description"="group identifier"} + * {"name"="userId", "dataType"="string", "description"="User identifier"}, + * {"name"="groupId", "dataType"="string", "description"="Group identifier"} * }, * output={"class"="Sonata\UserBundle\Model\User", "groups"={"sonata_api_read"}}, * statusCodes={ @@ -220,8 +220,8 @@ public function deleteUserAction($id) * } * ) * - * @param int $userId A User identifier - * @param int $groupId A Group identifier + * @param string $userId A User identifier + * @param string $groupId A Group identifier * * @throws NotFoundHttpException * @throws \RuntimeException @@ -250,8 +250,8 @@ public function postUserGroupAction($userId, $groupId) * * @ApiDoc( * requirements={ - * {"name"="userId", "dataType"="integer", "requirement"="\d+", "description"="user identifier"}, - * {"name"="groupId", "dataType"="integer", "requirement"="\d+", "description"="group identifier"} + * {"name"="userId", "dataType"="string", "description"="User identifier"}, + * {"name"="groupId", "dataType"="string", "description"="Group identifier"} * }, * output={"class"="Sonata\UserBundle\Model\User", "groups"={"sonata_api_read"}}, * statusCodes={ @@ -261,8 +261,8 @@ public function postUserGroupAction($userId, $groupId) * } * ) * - * @param int $userId A User identifier - * @param int $groupId A Group identifier + * @param string $userId A User identifier + * @param string $groupId A Group identifier * * @throws NotFoundHttpException * @throws \RuntimeException @@ -289,7 +289,7 @@ public function deleteUserGroupAction($userId, $groupId) /** * Retrieves user with id $id or throws an exception if it doesn't exist. * - * @param $id + * @param string $id * * @throws NotFoundHttpException * @@ -309,7 +309,7 @@ protected function getUser($id) /** * Retrieves user with id $id or throws an exception if it doesn't exist. * - * @param $id + * @param string $id * * @throws NotFoundHttpException * @@ -329,8 +329,8 @@ protected function getGroup($id) /** * Write an User, this method is used by both POST and PUT action methods. * - * @param Request $request Symfony request - * @param int|null $id An User identifier + * @param Request $request Symfony request + * @param string|null $id An User identifier * * @return FormInterface */