@@ -63,7 +63,7 @@ |
||
| 63 | 63 | /** |
| 64 | 64 | * Gets the value of name. |
| 65 | 65 | * |
| 66 | - * @return mixed |
|
| 66 | + * @return string |
|
| 67 | 67 | */ |
| 68 | 68 | public function getName() |
| 69 | 69 | { |
@@ -13,7 +13,6 @@ |
||
| 13 | 13 | use Webcook\Cms\CoreBundle\Base\BasicEntity; |
| 14 | 14 | use Doctrine\ORM\Mapping as ORM; |
| 15 | 15 | use ApiPlatform\Core\Annotation\ApiResource; |
| 16 | -use ApiPlatform\Core\Annotation\ApiProperty; |
|
| 17 | 16 | use Symfony\Component\Validator\Constraints as Assert; |
| 18 | 17 | |
| 19 | 18 | /** |
@@ -197,7 +197,7 @@ |
||
| 197 | 197 | /** |
| 198 | 198 | * Gets the value of email. |
| 199 | 199 | * |
| 200 | - * @return mixed |
|
| 200 | + * @return string |
|
| 201 | 201 | */ |
| 202 | 202 | public function getEmail() |
| 203 | 203 | { |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace Webcook\Cms\SecurityBundle\Common; |
| 10 | 10 | |
| 11 | 11 | use Symfony\Component\Finder\Finder; |
| 12 | -use Doctrine\Common\Annotations\AnnotationReader; |
|
| 13 | 12 | |
| 14 | 13 | /** |
| 15 | 14 | * Basic helper class. |
@@ -9,19 +9,11 @@ |
||
| 9 | 9 | namespace Webcook\Cms\SecurityBundle\Controller; |
| 10 | 10 | |
| 11 | 11 | use Webcook\Cms\CoreBundle\Base\BaseRestController; |
| 12 | -use Webcook\Cms\SecurityBundle\Entity\Role; |
|
| 13 | -use Webcook\Cms\SecurityBundle\Entity\Resource; |
|
| 14 | 12 | use Webcook\Cms\SecurityBundle\Entity\RoleResource; |
| 15 | -use Webcook\Cms\SecurityBundle\Form\Type\RoleType; |
|
| 16 | 13 | use Webcook\Cms\SecurityBundle\Form\Type\ResourcesType; |
| 17 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 18 | 14 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
| 19 | -use Webcook\Cms\SecurityBundle\Authorization\Voter\WebcookCmsVoter; |
|
| 20 | 15 | use FOS\RestBundle\Controller\Annotations\Get; |
| 21 | -use FOS\RestBundle\Controller\Annotations\Post; |
|
| 22 | 16 | use FOS\RestBundle\Controller\Annotations\Put; |
| 23 | -use FOS\RestBundle\Controller\Annotations\Delete; |
|
| 24 | -use Doctrine\DBAL\LockMode; |
|
| 25 | 17 | |
| 26 | 18 | /** |
| 27 | 19 | * REST api controller - role management. |
@@ -207,7 +207,7 @@ |
||
| 207 | 207 | /** |
| 208 | 208 | * Sets the value of role. |
| 209 | 209 | * |
| 210 | - * @param mixed $role the role |
|
| 210 | + * @param Role $role the role |
|
| 211 | 211 | * |
| 212 | 212 | * @return self |
| 213 | 213 | */ |
@@ -11,9 +11,6 @@ |
||
| 11 | 11 | use Webcook\Cms\CoreBundle\Base\BasicEntity; |
| 12 | 12 | use Doctrine\ORM\Mapping as ORM; |
| 13 | 13 | use Webcook\Cms\SecurityBundle\Authorization\Voter\WebcookCmsVoter; |
| 14 | -use ApiPlatform\Core\Annotation\ApiProperty; |
|
| 15 | -use ApiPlatform\Core\Annotation\ApiResource; |
|
| 16 | -use Symfony\Component\Validator\Constraints as Assert; |
|
| 17 | 14 | |
| 18 | 15 | /** |
| 19 | 16 | * Role resource entity. |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use ApiPlatform\Core\EventListener\EventPriorities; |
| 6 | 6 | use Webcook\Cms\SecurityBundle\Entity\User; |
| 7 | -use Symfony\Component\HttpFoundation\Request; |
|
| 8 | 7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
| 9 | 8 | use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; |
| 10 | 9 | use Symfony\Component\HttpKernel\KernelEvents; |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * Send an email with a link to reset user's password. |
|
| 27 | - * |
|
| 28 | - * @ApiDoc( |
|
| 29 | - * description="Send an email with a link to reset user's password." |
|
| 30 | - * ) |
|
| 31 | - * @Post("password/email/reset", options={"i18n"=false}) |
|
| 32 | - */ |
|
| 26 | + * Send an email with a link to reset user's password. |
|
| 27 | + * |
|
| 28 | + * @ApiDoc( |
|
| 29 | + * description="Send an email with a link to reset user's password." |
|
| 30 | + * ) |
|
| 31 | + * @Post("password/email/reset", options={"i18n"=false}) |
|
| 32 | + */ |
|
| 33 | 33 | public function resetPasswordEmailAction(Request $request): Response |
| 34 | 34 | { |
| 35 | 35 | $email = $request->request->get('email'); |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * Reset password view. |
|
| 69 | - * |
|
| 70 | - * @ApiDoc( |
|
| 71 | - * description="Reset password view." |
|
| 72 | - * ) |
|
| 73 | - * @Get("password/reset", options={"i18n"=false}) |
|
| 74 | - */ |
|
| 68 | + * Reset password view. |
|
| 69 | + * |
|
| 70 | + * @ApiDoc( |
|
| 71 | + * description="Reset password view." |
|
| 72 | + * ) |
|
| 73 | + * @Get("password/reset", options={"i18n"=false}) |
|
| 74 | + */ |
|
| 75 | 75 | public function resetPasswordGetAction(Request $request): Response |
| 76 | 76 | { |
| 77 | 77 | $token = $request->query->get('token'); |