@@ -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 | |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | $this->session->getFlashBag()->add('error', $this->translator->trans($exception->getMessage())); |
| 56 | 56 | $url = $this->router->generate('fos_user_profile_edit'); |
| 57 | 57 | $event->setResponse(new RedirectResponse($url)); |
| 58 | - }elseif ($exception instanceof NotFoundHttpException){ |
|
| 58 | + } elseif ($exception instanceof NotFoundHttpException){ |
|
| 59 | 59 | $request = $event->getRequest(); |
| 60 | 60 | $route = $request->get('_route'); |
| 61 | 61 | |
@@ -122,7 +122,9 @@ |
||
| 122 | 122 | ->find($user_id); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - if (!$client) throw new \Exception('Unknown client identifier'); |
|
| 125 | + if (!$client) { |
|
| 126 | + throw new \Exception('Unknown client identifier'); |
|
| 127 | + } |
|
| 126 | 128 | |
| 127 | 129 | $authorizationCode = new \LoginCidadao\OAuthBundle\Entity\AuthCode(); |
| 128 | 130 | $authorizationCode->setToken($code); |