Skip to content

Commit

Permalink
code style #728
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermednt committed Oct 31, 2017
1 parent 0dda527 commit 19ab216
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/LoginCidadao/CoreBundle/Controller/Dev/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class ClientController extends Controller
public function newAction(Request $request)
{
$client = new Client();
$form = $this->createForm('LoginCidadao\CoreBundle\Form\Type\ClientFormType',
$client);
$form = $this->createForm('LoginCidadao\CoreBundle\Form\Type\ClientFormType', $client);

$form->handleRequest($request);
$messages = '';
Expand Down Expand Up @@ -102,8 +101,7 @@ public function gridDeveloperFilterAction(Request $request)
$sql->select('u');
$sql->where('1=1');
$sql->andWhere('u.cpf like ?1 or u.username like ?1 or u.email like ?1 or u.firstName like ?1 or u.surname like ?1');
$sql->setParameter('1',
'%'.addcslashes($parms['username'], '\\%_').'%');
$sql->setParameter('1', '%'.addcslashes($parms['username'], '\\%_').'%');
$sql->addOrderBy('u.id', 'desc');
$grid->setQueryBuilder($sql);
}
Expand Down Expand Up @@ -155,8 +153,7 @@ public function editAction(Request $request, $id)
return $this->redirect($this->generateUrl('lc_dev_client_new'));
}

$form = $this->createForm('LoginCidadao\CoreBundle\Form\Type\ClientFormType',
$client);
$form = $this->createForm('LoginCidadao\CoreBundle\Form\Type\ClientFormType', $client);
$form->handleRequest($request);
$messages = '';
if ($form->isValid()) {
Expand All @@ -168,8 +165,7 @@ public function editAction(Request $request, $id)
$clientManager = $this->container->get('fos_oauth_server.client_manager');
$clientManager->updateClient($client);
$translator = $this->get('translator');
$this->get('session')->getFlashBag()->add('success',
$translator->trans('Updated successfully!'));
$this->get('session')->getFlashBag()->add('success', $translator->trans('Updated successfully!'));

return $this->redirectToRoute('lc_dev_client_edit', compact('id'));
}
Expand Down

0 comments on commit 19ab216

Please sign in to comment.