Completed
Pull Request — master (#33)
by Pavel
03:21
created
src/AppBundle/Controller/RegistrationController.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -72,24 +72,24 @@
 block discarded – undo
72 72
      */
73 73
     public function checkUserHash($hash, $email)
74 74
     {
75
-         $em = $this->getDoctrine()->getManager();
75
+            $em = $this->getDoctrine()->getManager();
76 76
 
77
-         $user = $em->getRepository('AppBundle:User')
78
-             ->findOneBy(array('email' => $email, 'hash' => $hash));
77
+            $user = $em->getRepository('AppBundle:User')
78
+                ->findOneBy(array('email' => $email, 'hash' => $hash));
79 79
 
80
-         if ($user) {
80
+            if ($user) {
81 81
 
82
-             $user->setIsReg(true);
83
-             $user->setHash(null);
84
-             $this->addFlash('notice', 'You have successfully passed registration confirmation');
82
+                $user->setIsReg(true);
83
+                $user->setHash(null);
84
+                $this->addFlash('notice', 'You have successfully passed registration confirmation');
85 85
 
86
-             $em->flush();
86
+                $em->flush();
87 87
 
88
-             return $this->redirectToRoute('homepage');
89
-         }
88
+                return $this->redirectToRoute('homepage');
89
+            }
90 90
 
91
-         $this->addFlash('notice', 'You haven\'t passed registration confirmation');
91
+            $this->addFlash('notice', 'You haven\'t passed registration confirmation');
92 92
 
93
-         return $this->redirectToRoute('homepage');
93
+            return $this->redirectToRoute('homepage');
94 94
     }
95 95
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $email = trim($request->get('email'));
105 105
 
106 106
         $user = $em->getRepository('AppBundle:User')
107
-            ->findOneBy(['email' => $email]);
107
+            ->findOneBy([ 'email' => $email ]);
108 108
 
109 109
         if ($user && $user->getIsReg() == true) {
110 110
             $password = $this->get('app.custom.mailer')->sendMailRecovery($email);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             return $this->redirectToRoute('homepage');
128 128
         } else {
129 129
 
130
-            return [];
130
+            return [ ];
131 131
         }
132 132
     }
133 133
 }
Please login to merge, or discard this patch.
src/AppBundle/Services/MailerService.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: device
5
- * Date: 19.03.16
6
- * Time: 10:05
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 19.03.16
6
+     * Time: 10:05
7
+     */
8 8
 
9 9
 namespace AppBundle\Services;
10 10
 
Please login to merge, or discard this patch.
src/AppBundle/Services/RandomGenerator.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: device
5
- * Date: 20.03.16
6
- * Time: 10:40
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 20.03.16
6
+     * Time: 10:40
7
+     */
8 8
 
9 9
 namespace AppBundle\Services;
10 10
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
     public function generator()
15 15
     {
16 16
         $key = '';
17
-        $array = array_merge(range('A','Z'),range('a','z'),range('0','9'));
17
+        $array = array_merge(range('A', 'Z'), range('a', 'z'), range('0', '9'));
18 18
         $c = count($array);
19
-        for($i = 0; $i < 6; $i++) {
20
-            $key .= $array[rand(0, $c)];
19
+        for ($i = 0; $i < 6; $i++) {
20
+            $key .= $array[ rand(0, $c) ];
21 21
         }
22 22
 
23 23
         return $key;
Please login to merge, or discard this patch.