@@ -5,9 +5,7 @@ |
||
| 5 | 5 | use Doctrine\ORM\EntityManager; |
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Routing\Router; |
| 7 | 7 | use Symfony\Component\Form\FormFactory; |
| 8 | -use Symfony\Component\HttpFoundation\JsonResponse; |
|
| 9 | 8 | use Symfony\Component\HttpFoundation\RequestStack; |
| 10 | -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
|
| 11 | 9 | |
| 12 | 10 | // Valide les formulaires pour une entité et affiche la réponse à la demande |
| 13 | 11 | class FormHelper |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Doctrine\ORM\EntityManager; |
| 6 | 6 | use Doctrine\ORM\EntityRepository; |
| 7 | -use Symfony\Component\HttpFoundation\JsonResponse; |
|
| 8 | 7 | use Symfony\Component\HttpFoundation\RequestStack; |
| 9 | 8 | use Symfony\Component\HttpFoundation\Response; |
| 10 | 9 | |
@@ -2,6 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace KI\UserBundle\Controller; |
| 4 | 4 | |
| 5 | +use Exception; |
|
| 5 | 6 | use KI\CoreBundle\Controller\ResourceController; |
| 6 | 7 | use KI\UserBundle\Entity\Achievement; |
| 7 | 8 | use KI\UserBundle\Entity\User; |
@@ -13,7 +14,6 @@ discard block |
||
| 13 | 14 | use Symfony\Component\HttpFoundation\Request; |
| 14 | 15 | use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
| 15 | 16 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
| 16 | -use Exception; |
|
| 17 | 17 | |
| 18 | 18 | class UsersController extends ResourceController |
| 19 | 19 | { |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use KI\CoreBundle\Service\CurlService; |
| 7 | 7 | use KI\CoreBundle\Service\ImageService; |
| 8 | 8 | use KI\UserBundle\Entity\User; |
| 9 | - |
|
| 10 | 9 | use KI\UserBundle\Event\UserRegistrationEvent; |
| 11 | 10 | |
| 12 | 11 | class FacebookImportUserRegistrationListener |
@@ -33,26 +33,26 @@ |
||
| 33 | 33 | switch ($user->getPromo()) { |
| 34 | 34 | // Attention, toujours préciser l'id facebook de la promo d'après |
| 35 | 35 | // pour avoir les étrangers |
| 36 | - case '015': |
|
| 37 | - $id = '359646667495742'; |
|
| 38 | - break; // Wei't spirit |
|
| 39 | - case '016': |
|
| 40 | - $id = '1451446761806184'; |
|
| 41 | - break; // Wei't the phoque |
|
| 42 | - case '017': |
|
| 43 | - $id = '737969042997359'; |
|
| 44 | - break; // F'wei'ght Club |
|
| 45 | - case '018': |
|
| 46 | - $id = '1739424532975028'; |
|
| 47 | - break; // WEI'STED |
|
| 48 | - case '019': |
|
| 49 | - $id = '313192685791329'; |
|
| 50 | - break; // WEI'T FOR IT |
|
| 51 | - case '020': |
|
| 52 | - $id = '313192685791329'; |
|
| 53 | - break; // WEI'T FOR IT |
|
| 54 | - default: |
|
| 55 | - return; |
|
| 36 | + case '015': |
|
| 37 | + $id = '359646667495742'; |
|
| 38 | + break; // Wei't spirit |
|
| 39 | + case '016': |
|
| 40 | + $id = '1451446761806184'; |
|
| 41 | + break; // Wei't the phoque |
|
| 42 | + case '017': |
|
| 43 | + $id = '737969042997359'; |
|
| 44 | + break; // F'wei'ght Club |
|
| 45 | + case '018': |
|
| 46 | + $id = '1739424532975028'; |
|
| 47 | + break; // WEI'STED |
|
| 48 | + case '019': |
|
| 49 | + $id = '313192685791329'; |
|
| 50 | + break; // WEI'T FOR IT |
|
| 51 | + case '020': |
|
| 52 | + $id = '313192685791329'; |
|
| 53 | + break; // WEI'T FOR IT |
|
| 54 | + default: |
|
| 55 | + return; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // On récupère la liste des membres |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException; |
| 12 | 12 | use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; |
| 13 | 13 | use Symfony\Component\Security\Core\User\UserInterface; |
| 14 | - |
|
| 15 | 14 | use Symfony\Component\Security\Core\User\UserProviderInterface; |
| 16 | 15 | |
| 17 | 16 | |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
| 8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
| 9 | 9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 10 | -use Symfony\Component\Form\Exception\UnexpectedTypeException; |
|
| 11 | 10 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 11 | +use Symfony\Component\Form\Exception\UnexpectedTypeException; |
|
| 12 | 12 | use Symfony\Component\HttpFoundation\Request; |
| 13 | 13 | use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
| 14 | 14 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Doctrine\ORM\EntityManager; |
| 6 | 6 | use KI\PonthubBundle\Entity\Episode; |
| 7 | 7 | use KI\PonthubBundle\Entity\Game; |
| 8 | -use KI\PonthubBundle\Entity\Genre; |
|
| 9 | 8 | use KI\PonthubBundle\Entity\Movie; |
| 10 | 9 | use KI\PonthubBundle\Entity\Other; |
| 11 | 10 | use KI\PonthubBundle\Entity\Serie; |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | 6 | use JMS\Serializer\Annotation as JMS; |
| 7 | -use Symfony\Component\HttpFoundation\File\UploadedFile; |
|
| 8 | - |
|
| 9 | 7 | use Symfony\Component\Validator\Constraints as Assert; |
| 10 | 8 | |
| 11 | 9 | /** |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | public function formJson($data) |
| 87 | 87 | { |
| 88 | 88 | switch ($data['code']) { |
| 89 | - case 400: |
|
| 90 | - return $this->json($data['form'], $data['code']); |
|
| 91 | - case 204: |
|
| 92 | - default: |
|
| 93 | - return $this->json($data['item'], $data['code']); |
|
| 89 | + case 400: |
|
| 90 | + return $this->json($data['form'], $data['code']); |
|
| 91 | + case 204: |
|
| 92 | + default: |
|
| 93 | + return $this->json($data['item'], $data['code']); |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |