@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | public function reverseTransform($number) |
19 | 19 | { |
20 | - if (! $number) { |
|
20 | + if (!$number) { |
|
21 | 21 | return null; |
22 | 22 | } |
23 | 23 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | if (array_key_exists('ajax_choice_attr', $options)) { |
55 | 55 | $nForm = $form->getParent()->getName(); |
56 | - $options['ajax_choice_attr']['holder_id'] = $nForm . '_' . $form->getName(); |
|
56 | + $options['ajax_choice_attr']['holder_id'] = $nForm.'_'.$form->getName(); |
|
57 | 57 | if (isset($options['ajax_choice_attr']['filter'])) { |
58 | 58 | $this->transformation1($options['ajax_choice_attr']['filter'], $nForm); |
59 | 59 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | if (isset($grid['extra_form_prop'])) { |
77 | 77 | foreach ($grid['extra_form_prop'] as &$extraForm) { |
78 | - $extraForm = $nForm . '_' . $extraForm; |
|
78 | + $extraForm = $nForm.'_'.$extraForm; |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | } |
@@ -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' |
@@ -16,7 +16,7 @@ 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()) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | 'label' => 'Service', |
58 | 58 | 'class' => 'LoginCidadaoOAuthBundle:Client', |
59 | 59 | 'choice_label' => 'name', |
60 | - 'query_builder' => function (EntityRepository $er) use($person) { |
|
60 | + 'query_builder' => function(EntityRepository $er) use($person) { |
|
61 | 61 | return $er->createQueryBuilder('c') |
62 | 62 | ->where(':person MEMBER OF c.owners') |
63 | 63 | ->setParameter('person', $person) |
@@ -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) { |
@@ -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 | }); |
@@ -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( |
@@ -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'); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | $builder |
17 | 17 | ->add('googleAuthenticatorSecret', 'text', |
18 | - array( |
|
18 | + array( |
|
19 | 19 | 'read_only' => true, |
20 | 20 | 'label' => "Authenticator Secret" |
21 | 21 | )) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | $builder |
43 | 43 | ->add('enable', 'submit', |
44 | - array( |
|
44 | + array( |
|
45 | 45 | 'attr' => array('class' => 'btn btn-success'), |
46 | 46 | 'label' => 'Activate Two-Factor Authentication') |
47 | 47 | ); |