@@ -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 | |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | private function checkRegistrationAccessToken(Request $request, |
| 181 | - Client $client) |
|
| 181 | + Client $client) |
|
| 182 | 182 | { |
| 183 | 183 | $raw = $request->get('access_token', |
| 184 | 184 | $request->headers->get('authorization')); |
@@ -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 | |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return array_map( |
| 67 | - function ($item) use ($idKey, $indexedClients) { |
|
| 67 | + function($item) use ($idKey, $indexedClients) { |
|
| 68 | 68 | $id = $item[$idKey]; |
| 69 | 69 | $item[$idKey] = $indexedClients[$id]; |
| 70 | 70 | return $item; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use LoginCidadao\OpenIDBundle\Entity\ClientMetadata; |
| 8 | 8 | use LoginCidadao\OpenIDBundle\Manager\ClientManager; |
| 9 | 9 | use LoginCidadao\OpenIDBundle\Validator\SectorIdentifierUriChecker; |
| 10 | -use Symfony\Bundle\FrameworkBundle\Client; |
|
| 11 | 10 | use Symfony\Component\HttpFoundation\Request; |
| 12 | 11 | use OAuth2\ServerBundle\Controller\AuthorizeController as BaseController; |
| 13 | 12 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | $scopeManager = $this->getScopeManager(); |
| 65 | 65 | $scopes = array_map( |
| 66 | - function ($value) { |
|
| 66 | + function($value) { |
|
| 67 | 67 | return $value->getScope(); |
| 68 | 68 | }, |
| 69 | 69 | $scopeManager->findScopesByScopes($scope) |
@@ -10,8 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | namespace LoginCidadao\OpenIDBundle\Validator\Constraints; |
| 12 | 12 | |
| 13 | -use Doctrine\ORM\EntityManager; |
|
| 14 | -use LoginCidadao\OAuthBundle\Entity\Client; |
|
| 15 | 13 | use LoginCidadao\OAuthBundle\Entity\Organization; |
| 16 | 14 | use LoginCidadao\OAuthBundle\Entity\OrganizationRepository; |
| 17 | 15 | use LoginCidadao\OpenIDBundle\Entity\ClientMetadata; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $checker = $this->security; |
| 37 | 37 | $person = $this->tokenStorage->getToken()->getUser(); |
| 38 | 38 | |
| 39 | - $organizationQueryBuilder = function (EntityRepository $er) use ($person, $checker) { |
|
| 39 | + $organizationQueryBuilder = function(EntityRepository $er) use ($person, $checker) { |
|
| 40 | 40 | $query = $er->createQueryBuilder('o'); |
| 41 | 41 | if (!$checker->isGranted('ROLE_ORGANIZATIONS_BIND_CLIENT_ANY_ORG')) { |
| 42 | 42 | $query->where(':person MEMBER OF o.members') |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | $builder->addEventListener( |
| 128 | 128 | FormEvents::PRE_SUBMIT, |
| 129 | - function (FormEvent $event) { |
|
| 129 | + function(FormEvent $event) { |
|
| 130 | 130 | $entity = $event->getData(); |
| 131 | 131 | $form = $event->getForm(); |
| 132 | 132 | $form->add( |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | 'required' => false, |
| 152 | 152 | 'class' => 'LoginCidadaoCoreBundle:Person', |
| 153 | 153 | 'choice_label' => 'fullNameOrUsername', |
| 154 | - 'query_builder' => function (EntityRepository $er) use (&$entity) { |
|
| 154 | + 'query_builder' => function(EntityRepository $er) use (&$entity) { |
|
| 155 | 155 | //$country = $er->createQueryBuilder('h')->getEntityManager()->getRepository('LoginCidadaoCoreBundle:Person')->findOneBy(array('iso2' => 'BR')); |
| 156 | 156 | $sql = $er->createQueryBuilder('u'); |
| 157 | 157 | if (!empty($entity['owners'])) { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | $builder->addEventListener( |
| 173 | 173 | FormEvents::PRE_SET_DATA, |
| 174 | - function (FormEvent $event) { |
|
| 174 | + function(FormEvent $event) { |
|
| 175 | 175 | $entity = $event->getData(); |
| 176 | 176 | $form = $event->getForm(); |
| 177 | 177 | if ($entity->getId()) { |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | 'required' => false, |
| 198 | 198 | 'class' => 'LoginCidadaoCoreBundle:Person', |
| 199 | 199 | 'choice_label' => 'fullNameOrUsername', |
| 200 | - 'query_builder' => function (EntityRepository $er) use (&$entity) { |
|
| 200 | + 'query_builder' => function(EntityRepository $er) use (&$entity) { |
|
| 201 | 201 | return $er->createQueryBuilder('u') |
| 202 | 202 | ->where(':client MEMBER OF u.clients')->setParameter( |
| 203 | 203 | 'client', |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 45 | 45 | { |
| 46 | - $members = function (EntityRepository $er) { |
|
| 46 | + $members = function(EntityRepository $er) { |
|
| 47 | 47 | return $er->createQueryBuilder('p') |
| 48 | 48 | ->innerJoin( |
| 49 | 49 | 'LoginCidadaoOAuthBundle:Organization', |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | $builder->addEventListener( |
| 134 | 134 | FormEvents::PRE_SUBMIT, |
| 135 | - function (FormEvent $event) { |
|
| 135 | + function(FormEvent $event) { |
|
| 136 | 136 | $entity = $event->getData(); |
| 137 | 137 | $form = $event->getForm(); |
| 138 | 138 | |
| 139 | - $qb = function (EntityRepository $er) use ($entity) { |
|
| 139 | + $qb = function(EntityRepository $er) use ($entity) { |
|
| 140 | 140 | $sql = $er->createQueryBuilder('u'); |
| 141 | 141 | if (!empty($entity['members'])) { |
| 142 | 142 | $sql->where('u.id in (:members)'); |
@@ -179,11 +179,11 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | $builder->addEventListener( |
| 181 | 181 | FormEvents::PRE_SET_DATA, |
| 182 | - function (FormEvent $event) { |
|
| 182 | + function(FormEvent $event) { |
|
| 183 | 183 | $entity = $event->getData(); |
| 184 | 184 | $form = $event->getForm(); |
| 185 | 185 | |
| 186 | - $qb = function (EntityRepository $er) use (&$entity) { |
|
| 186 | + $qb = function(EntityRepository $er) use (&$entity) { |
|
| 187 | 187 | return $er->createQueryBuilder('p') |
| 188 | 188 | ->innerJoin( |
| 189 | 189 | 'LoginCidadaoOAuthBundle:Organization', |
@@ -6,7 +6,6 @@ |
||
| 6 | 6 | use JMS\Serializer\SerializationContext; |
| 7 | 7 | use LoginCidadao\APIBundle\Exception\RequestTimeoutException; |
| 8 | 8 | use LoginCidadao\CoreBundle\Entity\Person; |
| 9 | -use LoginCidadao\CoreBundle\Entity\Authorization; |
|
| 10 | 9 | use Symfony\Component\HttpFoundation\Request; |
| 11 | 10 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
| 12 | 11 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |