Completed
Branch master (ca1420)
by Guilherme
07:28 queued 32s
created
src/LoginCidadao/CoreBundle/Controller/PersonController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                     'client' => $client,
80 80
                     'user' => $user
81 81
                 ));
82
-                $refreshTokens  = $em->getRepository('LoginCidadaoOAuthBundle:RefreshToken')
82
+                $refreshTokens = $em->getRepository('LoginCidadaoOAuthBundle:RefreshToken')
83 83
                     ->findBy(array(
84 84
                     'client' => $client,
85 85
                     'user' => $user
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     public function registrationCpfAction(Request $request)
217 217
     {
218 218
         $person = $this->getUser();
219
-        if (is_numeric($cpf    = preg_replace('/[^0-9]/', '',
219
+        if (is_numeric($cpf = preg_replace('/[^0-9]/', '',
220 220
                 $request->get('cpf'))) && strlen($cpf) == 11) {
221 221
             $person->setCpf($cpf);
222 222
         }
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
     {
396 396
         $form = $this->createForm(new DocRgFormType());
397 397
         $rg   = null;
398
-        if (($id   = $request->get('id')) || (($data = $request->get($form->getName()))
399
-            && ($id   = $data['id']))) {
398
+        if (($id = $request->get('id')) || (($data = $request->get($form->getName()))
399
+            && ($id = $data['id']))) {
400 400
             $rg = $this->getDoctrine()
401 401
                     ->getManager()
402 402
                     ->getRepository('LoginCidadaoCoreBundle:IdCard')->findOneBy(array(
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -461,11 +461,21 @@
 block discarded – undo
461 461
         $n5    = ($rg[0] * 2) % 9;
462 462
         $total = $n1 + $n2 + $n3 + $n4 + $n5 + $rg[7] + $rg[5] + $rg[3] + $rg[1];
463 463
 
464
-        if ($rg[8] == 9) $total = $total + 9;
465
-        if ($rg[6] == 9) $total = $total + 9;
466
-        if ($rg[4] == 9) $total = $total + 9;
467
-        if ($rg[2] == 9) $total = $total + 9;
468
-        if ($rg[0] == 9) $total = $total + 9;
464
+        if ($rg[8] == 9) {
465
+            $total = $total + 9;
466
+        }
467
+        if ($rg[6] == 9) {
468
+            $total = $total + 9;
469
+        }
470
+        if ($rg[4] == 9) {
471
+            $total = $total + 9;
472
+        }
473
+        if ($rg[2] == 9) {
474
+            $total = $total + 9;
475
+        }
476
+        if ($rg[0] == 9) {
477
+            $total = $total + 9;
478
+        }
469 479
 
470 480
         $resto = $total % 10;
471 481
 
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Controller/StatisticsController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 
70 70
         return $this->render('LoginCidadaoCoreBundle:Statistics:usersByRegion.html.twig',
71
-                             array('data' => $data, 'totalUsers' => $totalUsers));
71
+                                array('data' => $data, 'totalUsers' => $totalUsers));
72 72
     }
73 73
 
74 74
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $data = $repo->getCountByCity($stateId);
83 83
 
84 84
         return $this->render('LoginCidadaoCoreBundle:Statistics:usersByCity.html.twig',
85
-                             array('data' => $data));
85
+                                array('data' => $data));
86 86
     }
87 87
 
88 88
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     }
153 153
 
154 154
     private function getNewUsersByService($days, $clientId = null,
155
-                                          $format = 'html')
155
+                                            $format = 'html')
156 156
     {
157 157
         $em        = $this->getDoctrine()->getManager();
158 158
         $repo      = $em->getRepository('LoginCidadaoOAuthBundle:Client');
Please login to merge, or discard this patch.
LoginCidadao/CoreBundle/Controller/TwoFactorAuthenticationController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $person = $this->getPerson();
68 68
         $form = $this->createForm(new TwoFactorAuthenticationDisableFormType(),
69
-                                  $person);
69
+                                    $person);
70 70
         $form->handleRequest($request);
71 71
 
72 72
         if ($form->isValid()) {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $person = $this->getPerson();
92 92
         $form = $this->createForm(new TwoFactorAuthenticationBackupCodeGenerationFormType(),
93
-                                  $person);
93
+                                    $person);
94 94
         $form->handleRequest($request);
95 95
 
96 96
         if ($form->isValid()) {
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     }
148 148
 
149 149
     protected function removeBackupCodes(EntityManager $em,
150
-                                         PersonInterface $person)
150
+                                            PersonInterface $person)
151 151
     {
152 152
         $backupCodes = $person->getBackupCodes();
153 153
         foreach ($backupCodes as $backupCode) {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     }
157 157
 
158 158
     protected function generateBackupCodes(EntityManager $em,
159
-                                           PersonInterface $person)
159
+                                            PersonInterface $person)
160 160
     {
161 161
         $generator = new SecureRandom();
162 162
         $backupCodes = array();
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/DQL/CountIf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 
20 20
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
21 21
     {
22
-        return 'count(case when ' . $this->var1->dispatch($sqlWalker) . ' then 1 else null end)'; // (7)
22
+        return 'count(case when '.$this->var1->dispatch($sqlWalker).' then 1 else null end)'; // (7)
23 23
     }
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/DQL/LowerUnaccent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 
29 29
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
30 30
     {
31
-        return 'lower_unaccent(' . $this->var1->dispatch($sqlWalker) . ')'; // (7)
31
+        return 'lower_unaccent('.$this->var1->dispatch($sqlWalker).')'; // (7)
32 32
     }
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/DQL/Right.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
 
23 23
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
24 24
     {
25
-        return 'RIGHT(' . $this->var1->dispatch($sqlWalker) . ', ' . $this->var2->dispatch($sqlWalker) . ')'; // (7)
25
+        return 'RIGHT('.$this->var1->dispatch($sqlWalker).', '.$this->var2->dispatch($sqlWalker).')'; // (7)
26 26
     }
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/DynamicFormEvents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     /**
13 13
      * This event is triggered just after the form information gets persisted.
14 14
      */
15
-    const POST_FORM_EDIT       = 'dynamicform_post_edit';
15
+    const POST_FORM_EDIT = 'dynamicform_post_edit';
16 16
 
17 17
     /**
18 18
      * This event is triggered before redirecting the user to the target URL.
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Entity/CityRepository.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
             ->select('c')
16 16
             ->from('LoginCidadaoCoreBundle:City', 'c')
17 17
             ->join('LoginCidadaoCoreBundle:State', 's', 'WITH',
18
-                   'c.state = s')
18
+                    'c.state = s')
19 19
             ->join('LoginCidadaoCoreBundle:Country', 'co', 'WITH',
20
-                   's.country = co')
20
+                    's.country = co')
21 21
             ->where('c.name LIKE :string OR LOWER(c.name) LIKE :string')
22 22
             ->addOrderBy('s.preference', 'DESC')
23 23
             ->addOrderBy('c.name', 'ASC')
Please login to merge, or discard this patch.
src/LoginCidadao/CoreBundle/Entity/IdCardRepository.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         $qb = $this->createQueryBuilder('u')
14 14
             ->select('u.id, u.value, right(s.iso6, 2) iso6')
15 15
             ->join('LoginCidadaoCoreBundle:State', 's', 'with',
16
-                   'u.state = s')
16
+                    'u.state = s')
17 17
             ->where('u.person = :person')
18 18
             ->setParameters(array('person' => $person))
19 19
             ->orderBy('u.id', 'desc');
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $qb = $this->createQueryBuilder('i')
35 35
             ->join('LoginCidadaoCoreBundle:State', 's', 'with',
36
-                   'i.state = s')
36
+                    'i.state = s')
37 37
             ->where('i.person = :person')
38 38
             ->setParameters(array('person' => $person))
39 39
             ->orderBy('s.acronym', 'asc');
Please login to merge, or discard this patch.