@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @return array |
| 53 | 53 | */ |
| 54 | 54 | public function getNotificationsAction(Request $request, |
| 55 | - ParamFetcherInterface $paramFetcher) |
|
| 55 | + ParamFetcherInterface $paramFetcher) |
|
| 56 | 56 | { |
| 57 | 57 | $offset = $paramFetcher->get('offset'); |
| 58 | 58 | $offset = null == $offset ? 0 : $offset; |
@@ -64,13 +64,13 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | if (array_search('get_all_notifications', $scopes) === false) { |
| 66 | 66 | $notifications = $this->getNotificationHandler()->getAllFromPersonByClient($person, |
| 67 | - $client, |
|
| 68 | - $limit, |
|
| 69 | - $offset); |
|
| 67 | + $client, |
|
| 68 | + $limit, |
|
| 69 | + $offset); |
|
| 70 | 70 | } else { |
| 71 | 71 | $notifications = $this->getNotificationHandler()->getAllFromPerson($person, |
| 72 | - $limit, |
|
| 73 | - $offset); |
|
| 72 | + $limit, |
|
| 73 | + $offset); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $this->renderWithContext($notifications); |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | $user = $token->getUser(); |
| 193 | 193 | if ($user instanceof ClientUser) { |
| 194 | 194 | return $this->validateNotificationAsClient($user->getClient(), |
| 195 | - $request); |
|
| 195 | + $request); |
|
| 196 | 196 | } elseif ($user instanceof PersonInterface) { |
| 197 | 197 | return $this->validateNotificationAsPerson($user, $request); |
| 198 | 198 | } else { |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | * @return \Doctrine\ORM\QueryBuilder |
| 82 | 82 | */ |
| 83 | 83 | private function getImpersonatonsWithoutReportsQuery($limit = null, |
| 84 | - PersonInterface $impersonator |
|
| 84 | + PersonInterface $impersonator |
|
| 85 | 85 | = null) |
| 86 | 86 | { |
| 87 | 87 | $query = $this->createQueryBuilder('l') |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | foreach ($this->reader->getMethodAnnotations($method) as $annotation) { |
| 37 | 37 | if ($annotation instanceof Loggable) { |
| 38 | 38 | $this->logger->logActivity($event->getRequest(), $annotation, |
| 39 | - $controller); |
|
| 39 | + $controller); |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @return ActionLog |
| 91 | 91 | */ |
| 92 | 92 | private function initLog(Request $request, $actionType, $controllerAction, |
| 93 | - $auditUsername) |
|
| 93 | + $auditUsername) |
|
| 94 | 94 | { |
| 95 | 95 | $controller = get_class($controllerAction[0]); |
| 96 | 96 | $action = $controllerAction[1]; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | public function registerLogin(Request $request, PersonInterface $person, |
| 127 | - array $controllerAction) |
|
| 127 | + array $controllerAction) |
|
| 128 | 128 | { |
| 129 | 129 | $auditUsername = $this->auditConfig->getCurrentUsername(); |
| 130 | 130 | $actionType = ActionLog::TYPE_LOGIN; |
@@ -63,17 +63,17 @@ discard block |
||
| 63 | 63 | $form = $this->createFormBuilder(); |
| 64 | 64 | foreach ($placeholders as $placeholder) { |
| 65 | 65 | $form->add('place_' . $placeholder->getId(), 'text', |
| 66 | - array( |
|
| 66 | + array( |
|
| 67 | 67 | 'label' => $placeholder->getName(), |
| 68 | 68 | 'data' => $placeholder->getDefault() |
| 69 | 69 | )); |
| 70 | 70 | } |
| 71 | 71 | $form->add('id', 'hidden', |
| 72 | - array( |
|
| 72 | + array( |
|
| 73 | 73 | 'data' => $categoryId |
| 74 | 74 | )); |
| 75 | 75 | $form->add('owners', 'ajax_choice', |
| 76 | - array( |
|
| 76 | + array( |
|
| 77 | 77 | 'attr' => array( |
| 78 | 78 | 'data-ac-route' => $this->generateUrl('lc_dev_shout_step_category'), |
| 79 | 79 | 'data-ac-search-prop' => 'name', |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | return $this->redirect($this->generateUrl('lc_dev_shout_new')); |
| 132 | 132 | } |
| 133 | 133 | $form = $this->createForm('lc.client.base.form.type', |
| 134 | - $client); |
|
| 134 | + $client); |
|
| 135 | 135 | $form->handleRequest($request); |
| 136 | 136 | $messages = ''; |
| 137 | 137 | if ($form->isValid()) { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $messages = 'aeee'; |
| 142 | 142 | } |
| 143 | 143 | return $this->render('LoginCidadaoCoreBundle:Dev\Client:new.html.twig', |
| 144 | - array( |
|
| 144 | + array( |
|
| 145 | 145 | 'form' => $form->createView(), |
| 146 | 146 | 'client' => $client, |
| 147 | 147 | 'messages' => $messages |
@@ -41,13 +41,13 @@ |
||
| 41 | 41 | if ($form->isValid()) { |
| 42 | 42 | $event = new FormEvent($form, $request); |
| 43 | 43 | $dispatcher->dispatch(ProfileEditListner::PROFILE_DOC_EDIT_SUCCESS, |
| 44 | - $event); |
|
| 44 | + $event); |
|
| 45 | 45 | |
| 46 | 46 | $userManager = $this->get('fos_user.user_manager'); |
| 47 | 47 | $userManager->updateUser($user); |
| 48 | 48 | $translator = $this->get('translator'); |
| 49 | 49 | $this->get('session')->getFlashBag()->add('success', |
| 50 | - $translator->trans("Documents were successfully changed")); |
|
| 50 | + $translator->trans("Documents were successfully changed")); |
|
| 51 | 51 | return $this->redirect($this->generateUrl('lc_documents')); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | private function addField(Request $request, |
| 220 | - FormBuilderInterface $formBuilder, $scope, |
|
| 221 | - Person $person) |
|
| 220 | + FormBuilderInterface $formBuilder, $scope, |
|
| 221 | + Person $person) |
|
| 222 | 222 | { |
| 223 | 223 | $placeOfBirthLevel = ''; |
| 224 | 224 | switch ($scope) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | private function getPersonForm(FormBuilderInterface $formBuilder, |
| 288 | - Person $person) |
|
| 288 | + Person $person) |
|
| 289 | 289 | { |
| 290 | 290 | if ($formBuilder->has('person') === false) { |
| 291 | 291 | $formBuilder->add('person', new DynamicPersonType(), |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | private function addAddresses(FormBuilderInterface $formBuilder, |
| 299 | - Person $person, $new = true) |
|
| 299 | + Person $person, $new = true) |
|
| 300 | 300 | { |
| 301 | 301 | $addresses = $person->getAddresses(); |
| 302 | 302 | $address = new PersonAddress(); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | private function addIdCard(Request $request, |
| 321 | - FormBuilderInterface $formBuilder, Person $person) |
|
| 321 | + FormBuilderInterface $formBuilder, Person $person) |
|
| 322 | 322 | { |
| 323 | 323 | $state = $this->getStateFromRequest($request); |
| 324 | 324 | $formData = $formBuilder->getData(); |
@@ -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'); |