@@ -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(); |
@@ -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'); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | ->select('s') |
| 16 | 16 | ->from('LoginCidadaoCoreBundle:State', 's') |
| 17 | 17 | ->join('LoginCidadaoCoreBundle:Country', 'c', 'WITH', |
| 18 | - 's.country = c') |
|
| 18 | + 's.country = c') |
|
| 19 | 19 | ->where('s.name LIKE :string OR LOWER(s.name) LIKE :string') |
| 20 | 20 | ->addOrderBy('c.preference', 'DESC') |
| 21 | 21 | ->addOrderBy('s.name', 'ASC') |
@@ -16,14 +16,14 @@ discard block |
||
| 16 | 16 | $person = $this->getUser(); |
| 17 | 17 | |
| 18 | 18 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
| 19 | - function (FormEvent $event) use($person) { |
|
| 19 | + function (FormEvent $event) use($person) { |
|
| 20 | 20 | $cat = $event->getData(); |
| 21 | 21 | $form = $event->getForm(); |
| 22 | 22 | if ($cat->getId()) { |
| 23 | 23 | $name = $cat->getClient() |
| 24 | 24 | ->getName(); |
| 25 | 25 | $form->add('client', 'text', |
| 26 | - array( |
|
| 26 | + array( |
|
| 27 | 27 | 'required' => true, |
| 28 | 28 | 'label' => 'Service', |
| 29 | 29 | 'mapped' => false, |
@@ -31,28 +31,28 @@ discard block |
||
| 31 | 31 | 'data' => $name, |
| 32 | 32 | )); |
| 33 | 33 | $form->add('mailTemplate', 'textarea', |
| 34 | - array( |
|
| 34 | + array( |
|
| 35 | 35 | 'required' => true, |
| 36 | 36 | 'attr' => array('rows' => 4) |
| 37 | 37 | )); |
| 38 | 38 | $form->add('markdownTemplate', 'textarea', |
| 39 | - array( |
|
| 39 | + array( |
|
| 40 | 40 | 'required' => true, |
| 41 | 41 | 'attr' => array('rows' => 4) |
| 42 | 42 | )); |
| 43 | 43 | $form->add('id', 'integer', |
| 44 | - array( |
|
| 44 | + array( |
|
| 45 | 45 | 'required' => false, |
| 46 | 46 | 'read_only' => true |
| 47 | 47 | )); |
| 48 | 48 | } else { |
| 49 | 49 | $form->add('id', 'hidden', |
| 50 | - array( |
|
| 50 | + array( |
|
| 51 | 51 | 'required' => false, |
| 52 | 52 | 'read_only' => true |
| 53 | 53 | )); |
| 54 | 54 | $form->add('client', 'entity', |
| 55 | - array( |
|
| 55 | + array( |
|
| 56 | 56 | 'required' => true, |
| 57 | 57 | 'label' => 'Service', |
| 58 | 58 | 'class' => 'LoginCidadaoOAuthBundle:Client', |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | }); |
| 69 | 69 | $builder->add('name', 'text', |
| 70 | - array( |
|
| 70 | + array( |
|
| 71 | 71 | 'required' => true |
| 72 | 72 | )); |
| 73 | 73 | $builder->add('defaultIcon', 'choice', |
| 74 | - array( |
|
| 74 | + array( |
|
| 75 | 75 | 'choices' => array( |
| 76 | 76 | 'glyphicon glyphicon-envelope' => 'envelope', |
| 77 | 77 | 'glyphicon glyphicon-exclamation-sign' => 'exclamation-sign' |
@@ -79,19 +79,19 @@ discard block |
||
| 79 | 79 | 'required' => true |
| 80 | 80 | )); |
| 81 | 81 | $builder->add('defaultTitle', 'text', |
| 82 | - array( |
|
| 82 | + array( |
|
| 83 | 83 | 'required' => true |
| 84 | 84 | )); |
| 85 | 85 | $builder->add('defaultShortText', 'text', |
| 86 | - array( |
|
| 86 | + array( |
|
| 87 | 87 | 'required' => true |
| 88 | 88 | )); |
| 89 | 89 | $builder->add('mailSenderAddress', 'text', |
| 90 | - array( |
|
| 90 | + array( |
|
| 91 | 91 | 'required' => true |
| 92 | 92 | )); |
| 93 | 93 | $builder->add('emailable', 'choice', |
| 94 | - array( |
|
| 94 | + array( |
|
| 95 | 95 | 'choices' => array( |
| 96 | 96 | '0' => 'No', |
| 97 | 97 | '1' => 'Yes' |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | public function finishView(FormView $view, FormInterface $form, |
| 221 | - array $options) |
|
| 221 | + array $options) |
|
| 222 | 222 | { |
| 223 | 223 | if ($view->children['country']->vars['choice_translation_domain'] === false) { |
| 224 | 224 | return; |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'mapped' => false |
| 64 | 64 | )); |
| 65 | 65 | |
| 66 | - if ($this->hasVerifyCaptcha()) { |
|
| 66 | + if ($this->hasVerifyCaptcha()) { |
|
| 67 | 67 | $builder->add('recaptcha', 'ewz_recaptcha', array( |
| 68 | 68 | 'attr' => array( |
| 69 | 69 | 'options' => array( |
@@ -152,9 +152,9 @@ |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | public static function filterRoles(PersonInterface $person, |
| 155 | - PersonInterface $loggedUser, |
|
| 156 | - FormInterface $form, array $roles, |
|
| 157 | - $securityHelper, $security) |
|
| 155 | + PersonInterface $loggedUser, |
|
| 156 | + FormInterface $form, array $roles, |
|
| 157 | + $securityHelper, $security) |
|
| 158 | 158 | { |
| 159 | 159 | $loggedUserLevel = $securityHelper->getLoggedInUserLevel(); |
| 160 | 160 | $targetPersonLevel = $securityHelper->getTargetPersonLevel($person); |