@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $checker = $this->security; |
36 | 36 | $person = $this->tokenStorage->getToken()->getUser(); |
37 | 37 | |
38 | - $organizationQueryBuilder = function (EntityRepository $er) use ($person, $checker) { |
|
38 | + $organizationQueryBuilder = function(EntityRepository $er) use ($person, $checker) { |
|
39 | 39 | $query = $er->createQueryBuilder('o'); |
40 | 40 | if (!$checker->isGranted('ROLE_ORGANIZATIONS_BIND_CLIENT_ANY_ORG')) { |
41 | 41 | $query->where(':person MEMBER OF o.members') |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | $builder->addEventListener(FormEvents::PRE_SUBMIT, |
86 | - function (FormEvent $event) { |
|
86 | + function(FormEvent $event) { |
|
87 | 87 | $entity = $event->getData(); |
88 | 88 | $form = $event->getForm(); |
89 | 89 | $form->add('owners', 'ajax_choice', |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ; |
124 | 124 | |
125 | 125 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
126 | - function (FormEvent $event) { |
|
126 | + function(FormEvent $event) { |
|
127 | 127 | $entity = $event->getData(); |
128 | 128 | $form = $event->getForm(); |
129 | 129 | if ($entity->getId()) { |
@@ -30,7 +30,7 @@ |
||
30 | 30 | $reserved = array_combine($this->reservedScopes, $this->reservedScopes); |
31 | 31 | |
32 | 32 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
33 | - function (FormEvent $event) use ($security, $public, $reserved) { |
|
33 | + function(FormEvent $event) use ($security, $public, $reserved) { |
|
34 | 34 | $form = $event->getForm(); |
35 | 35 | |
36 | 36 | if ($security->isGranted('ROLE_EDIT_CLIENT_ALLOWED_SCOPES') === false) { |
@@ -27,14 +27,14 @@ |
||
27 | 27 | $builder->add('id', 'hidden', array( |
28 | 28 | 'required' => false |
29 | 29 | )); |
30 | - $builder->add('state', 'entity',array( |
|
30 | + $builder->add('state', 'entity', array( |
|
31 | 31 | 'required' => true, |
32 | 32 | 'class' => 'LoginCidadaoCoreBundle:State', |
33 | 33 | 'choice_label' => 'name', |
34 | 34 | 'query_builder' => function(EntityRepository $er) { |
35 | 35 | $country = $er->createQueryBuilder('h')->getEntityManager()->getRepository('LoginCidadaoCoreBundle:Country')->findOneBy(array('iso2' => 'BR')); |
36 | 36 | return $er->createQueryBuilder('u') |
37 | - ->where('u.reviewed = ' . Country::REVIEWED_OK) |
|
37 | + ->where('u.reviewed = '.Country::REVIEWED_OK) |
|
38 | 38 | ->andWhere('u.country = :country') |
39 | 39 | ->setParameter('country', $country) |
40 | 40 | ->orderBy('u.name', 'ASC'); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | 'class' => 'LoginCidadaoCoreBundle:State', |
42 | 42 | 'choice_label' => 'name', |
43 | 43 | 'read_only' => true, |
44 | - 'query_builder' => function (EntityRepository $er) use($countryAcronym) { |
|
44 | + 'query_builder' => function(EntityRepository $er) use($countryAcronym) { |
|
45 | 45 | return $er->createQueryBuilder('s') |
46 | 46 | ->join('LoginCidadaoCoreBundle:Country', 'c', |
47 | 47 | 'WITH', 's.country = c') |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | |
64 | 64 | $dispatcher = $this->dispatcher; |
65 | 65 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
66 | - function (FormEvent $event) use ($dispatcher) { |
|
66 | + function(FormEvent $event) use ($dispatcher) { |
|
67 | 67 | $dispatcher->dispatch(ValidationEvents::ID_CARD_FORM_PRE_SET_DATA, |
68 | 68 | $event); |
69 | 69 | }); |
70 | 70 | $builder->addEventListener(FormEvents::PRE_SUBMIT, |
71 | - function (FormEvent $event) use ($dispatcher) { |
|
71 | + function(FormEvent $event) use ($dispatcher) { |
|
72 | 72 | $dispatcher->dispatch(ValidationEvents::ID_CARD_FORM_PRE_SUBMIT, |
73 | 73 | $event); |
74 | 74 | }); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ->add('postalCode'); |
65 | 65 | |
66 | 66 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
67 | - function (FormEvent $event) { |
|
67 | + function(FormEvent $event) { |
|
68 | 68 | $data = $event->getData(); |
69 | 69 | if ($data instanceof PersonAddress) { |
70 | 70 | if ($data->getCity()) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | }); |
78 | 78 | $builder->addEventListener(FormEvents::POST_SUBMIT, |
79 | - function (FormEvent $event) { |
|
79 | + function(FormEvent $event) { |
|
80 | 80 | $address = $event->getData(); |
81 | 81 | if ($address instanceof PersonAddress) { |
82 | 82 | $address->getLocation()->toObject($address); |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $securityHelper = $this->securityHelper; |
77 | 77 | $security = $this->security; |
78 | 78 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
79 | - function (FormEvent $event) use ($user, &$allRoles, &$securityHelper, &$security) { |
|
79 | + function(FormEvent $event) use ($user, &$allRoles, &$securityHelper, &$security) { |
|
80 | 80 | $person = $event->getData(); |
81 | 81 | $form = PersonResumeFormType::populateCountryStateCity($person, |
82 | 82 | $event->getForm()); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function buildForm(FormBuilderInterface $builder, array $options) |
30 | 30 | { |
31 | 31 | $builder->addEventListener(FormEvents::PRE_SET_DATA, |
32 | - function (FormEvent $event) { |
|
32 | + function(FormEvent $event) { |
|
33 | 33 | $form = $event->getForm()->getParent(); |
34 | 34 | $person = $form->getData(); |
35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $form->add('city', new CitySelectorComboType($person->getState())); |
40 | 40 | }); |
41 | 41 | $builder->addEventListener(FormEvents::PRE_SUBMIT, |
42 | - function (FormEvent $event) { |
|
42 | + function(FormEvent $event) { |
|
43 | 43 | $data = $event->getData(); |
44 | 44 | $form = $event->getForm()->getParent(); |
45 | 45 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | 'required' => true, |
39 | 39 | 'class' => 'LoginCidadaoNotificationBundle:Category', |
40 | 40 | 'choice_label' => 'name', |
41 | - 'query_builder' => function (EntityRepository $er) use(&$user) { |
|
41 | + 'query_builder' => function(EntityRepository $er) use(&$user) { |
|
42 | 42 | return $er->createQueryBuilder('u') |
43 | 43 | ->join('LoginCidadaoOAuthBundle:Client', 'c', 'with', |
44 | 44 | 'u.client = c') |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
16 | 16 | { |
17 | - $queryBuilder = function (EntityRepository $er) { |
|
17 | + $queryBuilder = function(EntityRepository $er) { |
|
18 | 18 | return $er->createQueryBuilder('u')->orderBy('u.acronym'); |
19 | 19 | }; |
20 | 20 | $stateRepo = $this->em->getRepository('LoginCidadaoCoreBundle:State'); |