Completed
Push — master ( b0d777...348cdf )
by Aimeos
10:27
created
Controller/AdminController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function indexAction()
31 31
 	{
32
-		if( $this->isAdmin() )
32
+		if ($this->isAdmin())
33 33
 		{
34
-			$params = array( 'site' => 'default', 'resource' => 'product', 'lang' => 'en' );
35
-			return $this->redirect( $this->generateUrl( 'aimeos_shop_jqadm_search', $params ) );
34
+			$params = array('site' => 'default', 'resource' => 'product', 'lang' => 'en');
35
+			return $this->redirect($this->generateUrl('aimeos_shop_jqadm_search', $params));
36 36
 		}
37 37
 
38
-		$param = array( 'error' => '', 'username' => '' );
38
+		$param = array('error' => '', 'username' => '');
39 39
 
40
-		if( $this->has( 'security.authentication_utils' ) )
40
+		if ($this->has('security.authentication_utils'))
41 41
 		{
42
-			$auth = $this->get( 'security.authentication_utils' );
42
+			$auth = $this->get('security.authentication_utils');
43 43
 
44 44
 			$param['error'] = $auth->getLastAuthenticationError();
45 45
 			$param['username'] = $auth->getLastUsername();
46 46
 		}
47 47
 
48
-		return $this->render( 'AimeosShopBundle:Admin:index.html.twig', $param );
48
+		return $this->render('AimeosShopBundle:Admin:index.html.twig', $param);
49 49
 	}
50 50
 
51 51
 
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	protected function isAdmin()
58 58
 	{
59
-		if( $this->has( 'security.authorization_checker' ) && $this->get( 'security.token_storage' )->getToken()
60
-			&& $this->get( 'security.authorization_checker' )->isGranted( 'ROLE_ADMIN' )
61
-			|| $this->has( 'security.context' ) && $this->get( 'security.context' )->getToken()
62
-			&& $this->get( 'security.context' )->isGranted( 'ROLE_ADMIN' )
59
+		if ($this->has('security.authorization_checker') && $this->get('security.token_storage')->getToken()
60
+			&& $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')
61
+			|| $this->has('security.context') && $this->get('security.context')->getToken()
62
+			&& $this->get('security.context')->isGranted('ROLE_ADMIN')
63 63
 		) {
64 64
 			return true;
65 65
 		}
Please login to merge, or discard this patch.