@@ -8,7 +8,6 @@ |
||
8 | 8 | use LoginCidadao\NotificationBundle\Entity\Notification; |
9 | 9 | use Symfony\Component\HttpFoundation\File\File; |
10 | 10 | use Symfony\Component\Validator\Constraints as Assert; |
11 | -use JMS\Serializer\Tests\Fixtures\Publisher; |
|
12 | 11 | use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
13 | 12 | use JMS\Serializer\Annotation as JMS; |
14 | 13 | use OAuth2\OAuth2; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @return array |
53 | 53 | */ |
54 | 54 | public function getNotificationsAction(Request $request, |
55 | - ParamFetcherInterface $paramFetcher) |
|
55 | + ParamFetcherInterface $paramFetcher) |
|
56 | 56 | { |
57 | 57 | $offset = $paramFetcher->get('offset'); |
58 | 58 | $offset = null == $offset ? 0 : $offset; |
@@ -64,13 +64,13 @@ discard block |
||
64 | 64 | |
65 | 65 | if (array_search('get_all_notifications', $scopes) === false) { |
66 | 66 | $notifications = $this->getNotificationHandler()->getAllFromPersonByClient($person, |
67 | - $client, |
|
68 | - $limit, |
|
69 | - $offset); |
|
67 | + $client, |
|
68 | + $limit, |
|
69 | + $offset); |
|
70 | 70 | } else { |
71 | 71 | $notifications = $this->getNotificationHandler()->getAllFromPerson($person, |
72 | - $limit, |
|
73 | - $offset); |
|
72 | + $limit, |
|
73 | + $offset); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | return $this->renderWithContext($notifications); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $user = $token->getUser(); |
193 | 193 | if ($user instanceof ClientUser) { |
194 | 194 | return $this->validateNotificationAsClient($user->getClient(), |
195 | - $request); |
|
195 | + $request); |
|
196 | 196 | } elseif ($user instanceof PersonInterface) { |
197 | 197 | return $this->validateNotificationAsPerson($user, $request); |
198 | 198 | } else { |
@@ -81,7 +81,7 @@ |
||
81 | 81 | * @return \Doctrine\ORM\QueryBuilder |
82 | 82 | */ |
83 | 83 | private function getImpersonatonsWithoutReportsQuery($limit = null, |
84 | - PersonInterface $impersonator |
|
84 | + PersonInterface $impersonator |
|
85 | 85 | = null) |
86 | 86 | { |
87 | 87 | $query = $this->createQueryBuilder('l') |
@@ -36,7 +36,7 @@ |
||
36 | 36 | foreach ($this->reader->getMethodAnnotations($method) as $annotation) { |
37 | 37 | if ($annotation instanceof Loggable) { |
38 | 38 | $this->logger->logActivity($event->getRequest(), $annotation, |
39 | - $controller); |
|
39 | + $controller); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @return ActionLog |
91 | 91 | */ |
92 | 92 | private function initLog(Request $request, $actionType, $controllerAction, |
93 | - $auditUsername) |
|
93 | + $auditUsername) |
|
94 | 94 | { |
95 | 95 | $controller = get_class($controllerAction[0]); |
96 | 96 | $action = $controllerAction[1]; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | public function registerLogin(Request $request, PersonInterface $person, |
127 | - array $controllerAction) |
|
127 | + array $controllerAction) |
|
128 | 128 | { |
129 | 129 | $auditUsername = $this->auditConfig->getCurrentUsername(); |
130 | 130 | $actionType = ActionLog::TYPE_LOGIN; |
@@ -135,7 +135,7 @@ |
||
135 | 135 | $msg['title'] = str_repeat($input, $r); |
136 | 136 | $msg['shorttext'] = str_repeat($input, $r); |
137 | 137 | } |
138 | - $not = new Notification(); |
|
138 | + $not = new Notification(); |
|
139 | 139 | $not->setPerson($person); |
140 | 140 | $not->setCategory($category); |
141 | 141 | $not->setIcon($category->getDefaultIcon()); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $translator = $this->get('translator'); |
70 | 70 | $message = $translator->trans('contact.form.sent'); |
71 | 71 | if ($form->isValid()) { |
72 | - $email = new SentEmail(); |
|
72 | + $email = new SentEmail(); |
|
73 | 73 | |
74 | 74 | ->setType('contact-mail') |
75 | 75 | ->setSubject('Fale conosco - '.$form->get('firstName')->getData()) |
@@ -63,17 +63,17 @@ discard block |
||
63 | 63 | $form = $this->createFormBuilder(); |
64 | 64 | foreach ($placeholders as $placeholder) { |
65 | 65 | $form->add('place_' . $placeholder->getId(), 'text', |
66 | - array( |
|
66 | + array( |
|
67 | 67 | 'label' => $placeholder->getName(), |
68 | 68 | 'data' => $placeholder->getDefault() |
69 | 69 | )); |
70 | 70 | } |
71 | 71 | $form->add('id', 'hidden', |
72 | - array( |
|
72 | + array( |
|
73 | 73 | 'data' => $categoryId |
74 | 74 | )); |
75 | 75 | $form->add('owners', 'ajax_choice', |
76 | - array( |
|
76 | + array( |
|
77 | 77 | 'attr' => array( |
78 | 78 | 'data-ac-route' => $this->generateUrl('lc_dev_shout_step_category'), |
79 | 79 | 'data-ac-search-prop' => 'name', |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $this->redirect($this->generateUrl('lc_dev_shout_new')); |
132 | 132 | } |
133 | 133 | $form = $this->createForm('lc.client.base.form.type', |
134 | - $client); |
|
134 | + $client); |
|
135 | 135 | $form->handleRequest($request); |
136 | 136 | $messages = ''; |
137 | 137 | if ($form->isValid()) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $messages = 'aeee'; |
142 | 142 | } |
143 | 143 | return $this->render('LoginCidadaoCoreBundle:Dev\Client:new.html.twig', |
144 | - array( |
|
144 | + array( |
|
145 | 145 | 'form' => $form->createView(), |
146 | 146 | 'client' => $client, |
147 | 147 | 'messages' => $messages |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | $form = $this->createFormBuilder(); |
64 | 64 | foreach ($placeholders as $placeholder) { |
65 | - $form->add('place_' . $placeholder->getId(), 'text', |
|
65 | + $form->add('place_'.$placeholder->getId(), 'text', |
|
66 | 66 | array( |
67 | 67 | 'label' => $placeholder->getName(), |
68 | 68 | 'data' => $placeholder->getDefault() |
@@ -41,13 +41,13 @@ |
||
41 | 41 | if ($form->isValid()) { |
42 | 42 | $event = new FormEvent($form, $request); |
43 | 43 | $dispatcher->dispatch(ProfileEditListner::PROFILE_DOC_EDIT_SUCCESS, |
44 | - $event); |
|
44 | + $event); |
|
45 | 45 | |
46 | 46 | $userManager = $this->get('fos_user.user_manager'); |
47 | 47 | $userManager->updateUser($user); |
48 | 48 | $translator = $this->get('translator'); |
49 | 49 | $this->get('session')->getFlashBag()->add('success', |
50 | - $translator->trans("Documents were successfully changed")); |
|
50 | + $translator->trans("Documents were successfully changed")); |
|
51 | 51 | return $this->redirect($this->generateUrl('lc_documents')); |
52 | 52 | } |
53 | 53 |