Completed
Pull Request — dev (#8)
by
unknown
02:50
created
src/AppBundle/Controller/Api/DefaultController.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 {
13 13
     /**
14 14
 
15
-     * @param Request $request
16 15
      * @Route("/login", name="api_login")
17 16
      * @return JsonResponse
18 17
      */
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 class DefaultController extends Controller
12 12
 {
13 13
     /**
14
-
15 14
      * @param Request $request
16 15
      * @Route("/login", name="api_login")
17 16
      * @return JsonResponse
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
     {
21 21
         $user = $this->getDoctrine()->getRepository('AppBundle:UserIntern')
22 22
             ->findOneBy(['userName' => $request->get('login')]);
23
-        if (!$user){
23
+        if (!$user) {
24 24
             return new JsonResponse(['message' => 'Bad credentials'], 403);
25 25
         }
26 26
         $result = $this->get('security.encoder_factory')
27 27
             ->getEncoder($user)
28 28
             ->isPasswordValid($user->getPassword(), $request->get('password'), null);
29
-        if (!$result){
29
+        if (!$result) {
30 30
             return new JsonResponse(['message' => 'Bad credentials'], 403);
31 31
         }
32 32
 
Please login to merge, or discard this patch.