@@ -79,7 +79,7 @@ discard block |
||
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 |
||
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 |
||
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( |
@@ -461,11 +461,21 @@ |
||
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 |
@@ -68,7 +68,7 @@ discard block |
||
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 |
||
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 |
||
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'); |
@@ -66,7 +66,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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(); |
@@ -19,6 +19,6 @@ |
||
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 |
@@ -28,6 +28,6 @@ |
||
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 |
@@ -22,6 +22,6 @@ |
||
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 |
@@ -12,7 +12,7 @@ |
||
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. |
@@ -15,9 +15,9 @@ |
||
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') |
@@ -13,7 +13,7 @@ discard block |
||
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 |
||
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'); |