@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | protected function getFixturesDir() |
36 | 36 | { |
37 | - return $this->container->getParameter('kernel.project_dir') . '/fixtures/'; |
|
37 | + return $this->container->getParameter('kernel.project_dir').'/fixtures/'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function getFullName() |
249 | 249 | { |
250 | - return sprintf('%s %s', (string)$this->getFirstName(), (string)$this->getLastName()); |
|
250 | + return sprintf('%s %s', (string) $this->getFirstName(), (string) $this->getLastName()); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | public function getListFullName() |
257 | 257 | { |
258 | - return sprintf('%s %s', (string)$this->getLastName(), (string)$this->getFirstName()); |
|
258 | + return sprintf('%s %s', (string) $this->getLastName(), (string) $this->getFirstName()); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | /** |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | { |
101 | 101 | $helper = $this->getAuthenticationUtils(); |
102 | 102 | |
103 | - return $this->render($this->context . '/security/login.html.twig', [ |
|
103 | + return $this->render($this->context.'/security/login.html.twig', [ |
|
104 | 104 | 'last_username' => $helper->getLastUsername(), |
105 | 105 | 'error' => $helper->getLastAuthenticationError(), |
106 | - 'layout_template' => $this->context . '/empty_layout.html.twig', |
|
107 | - 'security_login_check_url' => $this->generateUrl($this->context . '_security_login_check'), |
|
108 | - 'security_forgot_password_url' => $this->generateUrl($this->context . '_security_forgot_password'), |
|
106 | + 'layout_template' => $this->context.'/empty_layout.html.twig', |
|
107 | + 'security_login_check_url' => $this->generateUrl($this->context.'_security_login_check'), |
|
108 | + 'security_forgot_password_url' => $this->generateUrl($this->context.'_security_forgot_password'), |
|
109 | 109 | ]); |
110 | 110 | } |
111 | 111 | |
@@ -116,22 +116,22 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function forgotPassword(Request $request) |
118 | 118 | { |
119 | - $form = $this->createForm(ForgotPasswordType::class); |
|
119 | + $form = $this->createForm(ForgotPasswordType::class); |
|
120 | 120 | $form->handleRequest($request); |
121 | 121 | |
122 | 122 | if (!$form->isSubmitted() || !$form->isValid()) { |
123 | 123 | return $this->render( |
124 | - $this->context . '/security/forgot_password.html.twig', |
|
124 | + $this->context.'/security/forgot_password.html.twig', |
|
125 | 125 | [ |
126 | 126 | 'form' => $form->createView(), |
127 | - 'security_login_form_url' => $this->generateUrl($this->context . '_security_login_form'), |
|
128 | - 'security_forgot_password_url' => $this->generateUrl($this->context . '_security_forgot_password'), |
|
127 | + 'security_login_form_url' => $this->generateUrl($this->context.'_security_login_form'), |
|
128 | + 'security_forgot_password_url' => $this->generateUrl($this->context.'_security_forgot_password'), |
|
129 | 129 | ] |
130 | 130 | ); |
131 | 131 | } |
132 | 132 | |
133 | 133 | try { |
134 | - $user = $this->get($this->context . '_user_provider')->loadUserByUsername($form->get('email')->getData()); |
|
134 | + $user = $this->get($this->context.'_user_provider')->loadUserByUsername($form->get('email')->getData()); |
|
135 | 135 | |
136 | 136 | if ($user instanceof SmartUserInterface) { |
137 | 137 | $token = $this->tokenManager->create(Token::RESET_PASSWORD, $user); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'context' => $this->context, |
143 | 143 | 'token' => $token->getValue(), |
144 | 144 | 'domain' => $this->getDomain(), |
145 | - 'security_reset_password_route' => $this->context . '_security_reset_password' |
|
145 | + 'security_reset_password_route' => $this->context.'_security_reset_password' |
|
146 | 146 | ], $user->getEmail())); |
147 | 147 | |
148 | 148 | $this->addFlash('success', 'flash.forgot_password.success'); |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | } catch (UsernameNotFoundException $e) { |
151 | 151 | $this->addFlash('error', 'flash.forgot_password.unknown'); |
152 | 152 | |
153 | - return $this->redirectToRoute($this->context . '_security_forgot_password'); |
|
153 | + return $this->redirectToRoute($this->context.'_security_forgot_password'); |
|
154 | 154 | } |
155 | 155 | |
156 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
156 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
@@ -177,41 +177,41 @@ discard block |
||
177 | 177 | public function resetPassword(Request $request) |
178 | 178 | { |
179 | 179 | if ($this->getUser()) { |
180 | - return $this->redirectToRoute($this->context . '_dashboard'); |
|
180 | + return $this->redirectToRoute($this->context.'_dashboard'); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | if (!$request->query->has('token')) { |
184 | 184 | $this->addFlash('error', 'flash.security.invalid_token'); |
185 | 185 | |
186 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
186 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | try { |
190 | 190 | $token = $this->tokenManager->get(Token::RESET_PASSWORD, $request->query->get('token')); |
191 | 191 | } catch (TokenNotFoundException $e) { |
192 | 192 | $this->addFlash('error', 'flash.security.token_not_found'); |
193 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
193 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
194 | 194 | } catch (TokenExpiredException $e) { |
195 | 195 | $this->addFlash('error', 'flash.security.token_expired'); |
196 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
196 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
197 | 197 | } catch (TokenConsumedException $e) { |
198 | 198 | $this->addFlash('error', 'flash.security.token_used'); |
199 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
199 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | /** @var SmartUserInterface $user */ |
203 | 203 | $user = $this->tokenManager->getUser($token); |
204 | 204 | |
205 | - $form = $this->createForm(ResetPasswordType::class, $user); |
|
205 | + $form = $this->createForm(ResetPasswordType::class, $user); |
|
206 | 206 | $form->handleRequest($request); |
207 | 207 | |
208 | 208 | if (!$form->isSubmitted() || !$form->isValid()) { |
209 | 209 | return $this->render( |
210 | - $this->context . '/security/reset_password.html.twig', |
|
210 | + $this->context.'/security/reset_password.html.twig', |
|
211 | 211 | [ |
212 | 212 | 'token' => $token->getValue(), |
213 | 213 | 'form' => $form->createView(), |
214 | - 'security_reset_password_route' => $this->context . '_security_reset_password' |
|
214 | + 'security_reset_password_route' => $this->context.'_security_reset_password' |
|
215 | 215 | ] |
216 | 216 | ); |
217 | 217 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $this->addFlash('error', 'flash.reset_password.error'); |
227 | 227 | } |
228 | 228 | |
229 | - return $this->redirectToRoute($this->context . '_security_login_form'); |
|
229 | + return $this->redirectToRoute($this->context.'_security_login_form'); |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $form->handleRequest($request); |
245 | 245 | |
246 | 246 | if (!$form->isSubmitted() || !$form->isValid()) { |
247 | - return $this->render($this->context . '/security/profile.html.twig', [ |
|
247 | + return $this->render($this->context.'/security/profile.html.twig', [ |
|
248 | 248 | 'base_template' => $this->get('sonata.admin.pool')->getTemplate('layout'), |
249 | 249 | 'admin_pool' => $this->get('sonata.admin.pool'), |
250 | 250 | 'form' => $form->createView(), |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $loader = new XmlFileLoader( |
27 | 27 | $container, |
28 | - new FileLocator(__DIR__ . '/../Resources/config') |
|
28 | + new FileLocator(__DIR__.'/../Resources/config') |
|
29 | 29 | ); |
30 | 30 | $loader->load('admin_extension.xml'); |
31 | 31 | $loader->load('security.xml'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function prepend(ContainerBuilder $container) |
41 | 41 | { |
42 | - $config = Yaml::parse(file_get_contents(__DIR__ . '/../Resources/config/config.yml')); |
|
42 | + $config = Yaml::parse(file_get_contents(__DIR__.'/../Resources/config/config.yml')); |
|
43 | 43 | |
44 | 44 | foreach ($config as $name => $extension) { |
45 | 45 | $container->prependExtensionConfig($name, $extension); |