Completed
Push — master ( 858bee...ca95b0 )
by Pavel
10s
created
src/AppBundle/Services/AdminCreator.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,11 @@
 block discarded – undo
42 42
 
43 43
         $em = $this->doctrine->getManager();
44 44
         $user = $em->getRepository('AppBundle:User')->findBy(['email' => $email]);
45
-        if (!$user)
46
-            $user = new User();
47
-        else $user = $user[0];
45
+        if (!$user) {
46
+                    $user = new User();
47
+        } else {
48
+            $user = $user[0];
49
+        }
48 50
 
49 51
         $pass = $this->userPasswordEncoder->encodePassword($user, $password);
50 52
         $user->setEmail($email);
Please login to merge, or discard this patch.
src/AppBundle/Services/ImageManagerServices.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: 29.01.16
6
- * Time: 17:07
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 29.01.16
6
+     * Time: 17:07
7
+     */
8 8
 
9 9
 namespace AppBundle\Services;
10 10
 
Please login to merge, or discard this patch.
src/AppBundle/Services/Registration.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: 23.02.16
6
- * Time: 13:03
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 23.02.16
6
+     * Time: 13:03
7
+     */
8 8
 
9 9
 namespace AppBundle\Services;
10 10
 
Please login to merge, or discard this patch.
src/AppBundle/Command/AdminCreateCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $lastName   = $input->getArgument('lastName');
42 42
 
43 43
         $this->getContainer()->get('app.admin.creator')
44
-             ->create($email, $password, $firstName, $lastName);
44
+                ->create($email, $password, $firstName, $lastName);
45 45
 
46 46
         $output->writeln(sprintf('User <comment>%s</comment> was created/updated', $firstName.' '.$lastName));
47 47
     }
Please login to merge, or discard this patch.
src/AppBundle/EventListener/ModuleSubscriber.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: 24.02.16
6
- * Time: 11:21
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 24.02.16
6
+     * Time: 11:21
7
+     */
8 8
 
9 9
 namespace AppBundle\EventListener;
10 10
 
Please login to merge, or discard this patch.
src/AppBundle/Services/CheckAnswerV0.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
                 $result = $sumTrueCorrect != 0 ? 1 / $sumTrueCorrect / 2 : 0;
65 65
             } elseif ($countFalseAnswers > 1) {
66 66
                 $result = 0;
67
-            }
68
-            else {
67
+            } else {
69 68
                 $result = $sumTrueCorrect != 0 ? 1 / $sumTrueCorrect : 0;
70 69
             }
71 70
             //third type question
Please login to merge, or discard this patch.
src/AppBundle/Services/DeactivationPassModule.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: 09.03.16
6
- * Time: 19:01
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 09.03.16
6
+     * Time: 19:01
7
+     */
8 8
 
9 9
 namespace AppBundle\Services;
10 10
 
Please login to merge, or discard this patch.
src/AppBundle/Services/PassManager.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,8 +56,9 @@  discard block
 block discarded – undo
56 56
             return $this->generateOutput('error', 403, 'You do not have access to this module');
57 57
         }
58 58
 
59
-        if ($moduleUser->getAttempts() == $moduleUser->getModule()->getAttempts())
60
-            return $this->generateOutput('error', 403, 'Your attempts are exhausted');
59
+        if ($moduleUser->getAttempts() == $moduleUser->getModule()->getAttempts()) {
60
+                    return $this->generateOutput('error', 403, 'Your attempts are exhausted');
61
+        }
61 62
 
62 63
         $lastPass = $moduleUser->getPassModules()->last();
63 64
 
@@ -68,8 +69,9 @@  discard block
 block discarded – undo
68 69
 
69 70
         $time_residue = $this->checkDatePass($lastPass);
70 71
 
71
-        if (!$time_residue)
72
-            $this->identPass($idModule);
72
+        if (!$time_residue) {
73
+                    $this->identPass($idModule);
74
+        }
73 75
 
74 76
         return $this->generateOutput('redirect_to_pass', 301, $lastPass->getId());
75 77
     }
@@ -137,8 +139,9 @@  discard block
 block discarded – undo
137 139
             $firstQuestionForPass = $this->doctrine->getRepository('AppBundle:Question')
138 140
                 ->getFirstQuestionForPass($passModule->getId());
139 141
 
140
-            if(null === $firstQuestionForPass)
141
-                return $this->generateOutput('error', 500, 'This module does not have any questions ;(');
142
+            if(null === $firstQuestionForPass) {
143
+                            return $this->generateOutput('error', 500, 'This module does not have any questions ;(');
144
+            }
142 145
 
143 146
             $passModule->setCurrentQuestion($firstQuestionForPass);
144 147
             $this->doctrine->getEntityManager()->flush();
@@ -150,8 +153,9 @@  discard block
 block discarded – undo
150 153
 
151 154
         $time_residue = $this->checkDatePass($passModule);
152 155
 
153
-        if (!$time_residue)
154
-            return $this->generateOutput('error', 403, 'This pass is overdue ;(');
156
+        if (!$time_residue) {
157
+                    return $this->generateOutput('error', 403, 'This pass is overdue ;(');
158
+        }
155 159
 
156 160
 
157 161
         $currentQuestion = $passModule->getCurrentQuestion();
Please login to merge, or discard this patch.
src/AppBundle/Tests/Controller/Admin/InfoPassModulesControllerTest.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: 18.03.16
6
- * Time: 18:33
7
- */
3
+     * Created by PhpStorm.
4
+     * User: device
5
+     * Date: 18.03.16
6
+     * Time: 18:33
7
+     */
8 8
 
9 9
 namespace AppBundle\Tests\Controller\Admin;
10 10
 
Please login to merge, or discard this patch.