Passed
Pull Request — master (#27)
by Mathieu
29:50 queued 18:10
created
src/DataFixtures/AbstractFixtures.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Controller/AbstractSecurityController.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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');
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $this->addFlash('error', 'flash.forgot_password.unknown');
152 152
         }
153 153
 
154
-        return $this->redirectToRoute($this->context . '_security_login_form');
154
+        return $this->redirectToRoute($this->context.'_security_login_form');
155 155
     }
156 156
 
157 157
     /**
@@ -175,41 +175,41 @@  discard block
 block discarded – undo
175 175
     public function resetPassword(Request $request)
176 176
     {
177 177
         if ($this->getUser()) {
178
-            return $this->redirectToRoute($this->context . '_dashboard');
178
+            return $this->redirectToRoute($this->context.'_dashboard');
179 179
         }
180 180
 
181 181
         if (!$request->query->has('token')) {
182 182
             $this->addFlash('error', 'flash.security.invalid_token');
183 183
 
184
-            return $this->redirectToRoute($this->context . '_security_login_form');
184
+            return $this->redirectToRoute($this->context.'_security_login_form');
185 185
         }
186 186
 
187 187
         try {
188 188
             $token = $this->tokenManager->get(Token::RESET_PASSWORD, $request->query->get('token'));
189 189
         } catch (TokenNotFoundException $e) {
190 190
             $this->addFlash('error', 'flash.security.token_not_found');
191
-            return $this->redirectToRoute($this->context . '_security_login_form');
191
+            return $this->redirectToRoute($this->context.'_security_login_form');
192 192
         } catch (TokenExpiredException $e) {
193 193
             $this->addFlash('error', 'flash.security.token_expired');
194
-            return $this->redirectToRoute($this->context . '_security_login_form');
194
+            return $this->redirectToRoute($this->context.'_security_login_form');
195 195
         } catch (TokenConsumedException $e) {
196 196
             $this->addFlash('error', 'flash.security.token_used');
197
-            return $this->redirectToRoute($this->context . '_security_login_form');
197
+            return $this->redirectToRoute($this->context.'_security_login_form');
198 198
         }
199 199
 
200 200
         /** @var SmartUserInterface $user */
201 201
         $user = $this->tokenManager->getUser($token);
202 202
 
203
-        $form =  $this->createForm(ResetPasswordType::class, $user);
203
+        $form = $this->createForm(ResetPasswordType::class, $user);
204 204
         $form->handleRequest($request);
205 205
 
206 206
         if (!$form->isSubmitted() || !$form->isValid()) {
207 207
             return $this->render(
208
-                $this->context . '/security/reset_password.html.twig',
208
+                $this->context.'/security/reset_password.html.twig',
209 209
                 [
210 210
                     'token' => $token->getValue(),
211 211
                     'form' => $form->createView(),
212
-                    'security_reset_password_route' => $this->context . '_security_reset_password'
212
+                    'security_reset_password_route' => $this->context.'_security_reset_password'
213 213
                 ]
214 214
             );
215 215
         }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             $this->addFlash('error', 'flash.reset_password.error');
225 225
         }
226 226
 
227
-        return $this->redirectToRoute($this->context . '_security_login_form');
227
+        return $this->redirectToRoute($this->context.'_security_login_form');
228 228
     }
229 229
 
230 230
     /**
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         $form->handleRequest($request);
243 243
 
244 244
         if (!$form->isSubmitted() || !$form->isValid()) {
245
-            return $this->render($this->context . '/security/profile.html.twig', [
245
+            return $this->render($this->context.'/security/profile.html.twig', [
246 246
                 'base_template' => $this->get('sonata.admin.pool')->getTemplate('layout'),
247 247
                 'admin_pool'    => $this->get('sonata.admin.pool'),
248 248
                 'form'          => $form->createView(),
Please login to merge, or discard this patch.
src/Entity/User/UserTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/DependencyInjection/SmartAuthenticationExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $loader = new XmlFileLoader(
26 26
             $container,
27
-            new FileLocator(__DIR__ . '/../Resources/config')
27
+            new FileLocator(__DIR__.'/../Resources/config')
28 28
         );
29 29
         $loader->load('admin_extension.xml');
30 30
         $loader->load('security.xml');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $loader = new YamlFileLoader(
42 42
             $container,
43
-            new FileLocator(__DIR__ . '/../Resources/config')
43
+            new FileLocator(__DIR__.'/../Resources/config')
44 44
         );
45 45
         $loader->load('config.yml');
46 46
     }
Please login to merge, or discard this patch.