Completed
Push — master ( b14069...8dc9a2 )
by Aimeos
05:48
created
Service/View.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param RequestStack $requestStack Current request stack
32 32
 	 * @param Container $container Container object to access parameters
33 33
 	 */
34
-	public function __construct( RequestStack $requestStack, Container $container )
34
+	public function __construct(RequestStack $requestStack, Container $container)
35 35
 	{
36 36
 		$this->requestStack = $requestStack;
37 37
 		$this->container = $container;
@@ -46,53 +46,53 @@  discard block
 block discarded – undo
46 46
 	 * @param string|null $locale Code of the current language or null for no translation
47 47
 	 * @return \Aimeos\MW\View\Iface View object
48 48
 	 */
49
-	public function create( \Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null )
49
+	public function create(\Aimeos\MW\Config\Iface $config, array $templatePaths, $locale = null)
50 50
 	{
51 51
 		$params = $fixed = array();
52 52
 		$request = $this->requestStack->getMasterRequest();
53 53
 
54
-		if( $locale !== null )
54
+		if ($locale !== null)
55 55
 		{
56
-			$params = $request->request->all() + $request->query->all() + $request->attributes->get( '_route_params' );
56
+			$params = $request->request->all() + $request->query->all() + $request->attributes->get('_route_params');
57 57
 			$fixed = $this->getFixedParams();
58 58
 
59
-			$i18n = $this->container->get('aimeos_i18n')->get( array( $locale ) );
59
+			$i18n = $this->container->get('aimeos_i18n')->get(array($locale));
60 60
 			$translation = $i18n[$locale];
61 61
 		}
62 62
 		else
63 63
 		{
64
-			$translation = new \Aimeos\MW\Translation\None( 'en' );
64
+			$translation = new \Aimeos\MW\Translation\None('en');
65 65
 		}
66 66
 
67 67
 
68
-		$view = new \Aimeos\MW\View\Standard( $templatePaths );
68
+		$view = new \Aimeos\MW\View\Standard($templatePaths);
69 69
 
70
-		$helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $translation );
71
-		$view->addHelper( 'translate', $helper );
70
+		$helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $translation);
71
+		$view->addHelper('translate', $helper);
72 72
 
73
-		$helper = new \Aimeos\MW\View\Helper\Url\Symfony2( $view, $this->container->get( 'router' ), $fixed );
74
-		$view->addHelper( 'url', $helper );
73
+		$helper = new \Aimeos\MW\View\Helper\Url\Symfony2($view, $this->container->get('router'), $fixed);
74
+		$view->addHelper('url', $helper);
75 75
 
76
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
77
-		$view->addHelper( 'param', $helper );
76
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $params);
77
+		$view->addHelper('param', $helper);
78 78
 
79
-		$helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config );
80
-		$view->addHelper( 'config', $helper );
79
+		$helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config);
80
+		$view->addHelper('config', $helper);
81 81
 
82
-		$sepDec = $config->get( 'client/html/common/format/seperatorDecimal', '.' );
83
-		$sep1000 = $config->get( 'client/html/common/format/seperator1000', ' ' );
84
-		$helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, $sepDec, $sep1000 );
85
-		$view->addHelper( 'number', $helper );
82
+		$sepDec = $config->get('client/html/common/format/seperatorDecimal', '.');
83
+		$sep1000 = $config->get('client/html/common/format/seperator1000', ' ');
84
+		$helper = new \Aimeos\MW\View\Helper\Number\Standard($view, $sepDec, $sep1000);
85
+		$view->addHelper('number', $helper);
86 86
 
87
-		if( $request !== null )
87
+		if ($request !== null)
88 88
 		{
89
-			$helper = new \Aimeos\MW\View\Helper\Request\Symfony2( $view, $request );
90
-			$view->addHelper( 'request', $helper );
89
+			$helper = new \Aimeos\MW\View\Helper\Request\Symfony2($view, $request);
90
+			$view->addHelper('request', $helper);
91 91
 		}
92 92
 
93
-		$token = $this->container->get( 'security.csrf.token_manager' )->getToken( '_token' );
94
-		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_token', $token->getValue() );
95
-		$view->addHelper( 'csrf', $helper );
93
+		$token = $this->container->get('security.csrf.token_manager')->getToken('_token');
94
+		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_token', $token->getValue());
95
+		$view->addHelper('csrf', $helper);
96 96
 
97 97
 		return $view;
98 98
 	}
@@ -108,15 +108,15 @@  discard block
 block discarded – undo
108 108
 		$urlparams = array();
109 109
 		$attr = $this->requestStack->getMasterRequest()->attributes;
110 110
 
111
-		if( ( $site = $attr->get( 'site' ) ) !== null ) {
111
+		if (($site = $attr->get('site')) !== null) {
112 112
 			$urlparams['site'] = $site;
113 113
 		}
114 114
 
115
-		if( ( $lang = $attr->get( 'locale' ) ) !== null ) {
115
+		if (($lang = $attr->get('locale')) !== null) {
116 116
 			$urlparams['locale'] = $lang;
117 117
 		}
118 118
 
119
-		if( ( $currency = $attr->get( 'currency' ) ) !== null ) {
119
+		if (($currency = $attr->get('currency')) !== null) {
120 120
 			$urlparams['currency'] = $currency;
121 121
 		}
122 122
 
Please login to merge, or discard this patch.
Service/Context.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @param RequestStack $requestStack Current request stack
35 35
 	 * @param Container $container Container object to access parameters
36 36
 	 */
37
-	public function __construct( RequestStack $requestStack, Container $container )
37
+	public function __construct(RequestStack $requestStack, Container $container)
38 38
 	{
39 39
 		$this->requestStack = $requestStack;
40 40
 		$this->container = $container;
@@ -47,49 +47,49 @@  discard block
 block discarded – undo
47 47
 	 * @param boolean $locale True to add locale object to context, false if not
48 48
 	 * @return \Aimeos\MShop\Context\Item\Iface Context object
49 49
 	 */
50
-	public function get( $locale = true )
50
+	public function get($locale = true)
51 51
 	{
52
-		if( self::$context === null )
52
+		if (self::$context === null)
53 53
 		{
54 54
 			$context = new \Aimeos\MShop\Context\Item\Standard();
55 55
 
56 56
 			$config = $this->getConfig();
57
-			$context->setConfig( $config );
57
+			$context->setConfig($config);
58 58
 
59
-			$dbm = new \Aimeos\MW\DB\Manager\PDO( $config );
60
-			$context->setDatabaseManager( $dbm );
59
+			$dbm = new \Aimeos\MW\DB\Manager\PDO($config);
60
+			$context->setDatabaseManager($dbm);
61 61
 
62
-			$fs = new \Aimeos\MW\Filesystem\Manager\Standard( $config );
63
-			$context->setFilesystemManager( $fs );
62
+			$fs = new \Aimeos\MW\Filesystem\Manager\Standard($config);
63
+			$context->setFilesystemManager($fs);
64 64
 
65 65
 			$container = $this->container;
66
-			$mail = new \Aimeos\MW\Mail\Swift( function() use ( $container) { return $container->get( 'mailer' ); } );
67
-			$context->setMail( $mail );
66
+			$mail = new \Aimeos\MW\Mail\Swift(function() use ($container) { return $container->get('mailer'); } );
67
+			$context->setMail($mail);
68 68
 
69
-			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager( $context );
70
-			$context->setLogger( $logger );
69
+			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager($context);
70
+			$context->setLogger($logger);
71 71
 
72
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $context );
73
-			$context->setCache( $cache );
72
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($context);
73
+			$context->setCache($cache);
74 74
 
75 75
 			self::$context = $context;
76 76
 		}
77 77
 
78 78
 		$context = self::$context;
79 79
 
80
-		if( $locale === true )
80
+		if ($locale === true)
81 81
 		{
82
-			$localeItem = $this->getLocale( $context );
82
+			$localeItem = $this->getLocale($context);
83 83
 			$langid = $localeItem->getLanguageId();
84 84
 
85
-			$context->setLocale( $localeItem );
86
-			$context->setI18n( $this->container->get('aimeos_i18n')->get( array( $langid ) ) );
85
+			$context->setLocale($localeItem);
86
+			$context->setI18n($this->container->get('aimeos_i18n')->get(array($langid)));
87 87
 		}
88 88
 
89
-		$session = new \Aimeos\MW\Session\Symfony2( $this->container->get( 'session' ) );
90
-		$context->setSession( $session );
89
+		$session = new \Aimeos\MW\Session\Symfony2($this->container->get('session'));
90
+		$context->setSession($session);
91 91
 
92
-		$this->addUser( $context );
92
+		$this->addUser($context);
93 93
 
94 94
 		return $context;
95 95
 	}
@@ -100,39 +100,39 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
102 102
 	 */
103
-	protected function addUser( \Aimeos\MShop\Context\Item\Iface $context )
103
+	protected function addUser(\Aimeos\MShop\Context\Item\Iface $context)
104 104
 	{
105 105
 		$token = null;
106 106
 		$username = '';
107 107
 
108
-		if( $this->container->has( 'security.token_storage' ) ) {
109
-			$token = $this->container->get( 'security.token_storage' )->getToken();
108
+		if ($this->container->has('security.token_storage')) {
109
+			$token = $this->container->get('security.token_storage')->getToken();
110 110
 		}
111
-		else if( $this->container->has( 'security.context' ) ) {
112
-			$token = $this->container->get( 'security.context' )->getToken();
111
+		else if ($this->container->has('security.context')) {
112
+			$token = $this->container->get('security.context')->getToken();
113 113
 		}
114 114
 
115
-		if( is_object( $token ) )
115
+		if (is_object($token))
116 116
 		{
117
-			if( method_exists( $token->getUser(), 'getId' ) )
117
+			if (method_exists($token->getUser(), 'getId'))
118 118
 			{
119 119
 				$userid = $token->getUser()->getId();
120
-				$context->setUserId( $userid );
121
-				$context->setGroupIds( function() use ( $context, $userid )
120
+				$context->setUserId($userid);
121
+				$context->setGroupIds(function() use ($context, $userid)
122 122
 				{
123
-					$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
124
-					return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
123
+					$manager = \Aimeos\MShop\Factory::createManager($context, 'customer');
124
+					return $manager->getItem($userid, array('customer/group'))->getGroups();
125 125
 				} );
126 126
 			}
127 127
 
128
-			if( is_object( $token->getUser() ) ) {
129
-				$username =  $token->getUser()->getUsername();
128
+			if (is_object($token->getUser())) {
129
+				$username = $token->getUser()->getUsername();
130 130
 			} else {
131 131
 				$username = $token->getUser();
132 132
 			}
133 133
 		}
134 134
 
135
-		$context->setEditor( $username );
135
+		$context->setEditor($username);
136 136
 	}
137 137
 
138 138
 
@@ -143,26 +143,26 @@  discard block
 block discarded – undo
143 143
 	 */
144 144
 	protected function getConfig()
145 145
 	{
146
-		$configPaths = $this->container->get('aimeos')->get()->getConfigPaths( 'mysql' );
146
+		$configPaths = $this->container->get('aimeos')->get()->getConfigPaths('mysql');
147 147
 
148
-		$conf = new \Aimeos\MW\Config\PHPArray( array(), $configPaths );
148
+		$conf = new \Aimeos\MW\Config\PHPArray(array(), $configPaths);
149 149
 
150
-		$apc = (bool) $this->container->getParameter( 'aimeos_shop.apc_enable' );
151
-		$prefix = $this->container->getParameter( 'aimeos_shop.apc_prefix' );
150
+		$apc = (bool) $this->container->getParameter('aimeos_shop.apc_enable');
151
+		$prefix = $this->container->getParameter('aimeos_shop.apc_prefix');
152 152
 
153
-		if( function_exists( 'apc_store' ) === true && $apc === true ) {
154
-			$conf = new \Aimeos\MW\Config\Decorator\APC( $conf, $prefix );
153
+		if (function_exists('apc_store') === true && $apc === true) {
154
+			$conf = new \Aimeos\MW\Config\Decorator\APC($conf, $prefix);
155 155
 		}
156 156
 
157 157
 		$local = array(
158
-			'client' => $this->container->getParameter( 'aimeos_shop.client' ),
159
-			'controller' => $this->container->getParameter( 'aimeos_shop.controller' ),
160
-			'madmin' => $this->container->getParameter( 'aimeos_shop.madmin' ),
161
-			'mshop' => $this->container->getParameter( 'aimeos_shop.mshop' ),
162
-			'resource' => $this->container->getParameter( 'aimeos_shop.resource' ),
158
+			'client' => $this->container->getParameter('aimeos_shop.client'),
159
+			'controller' => $this->container->getParameter('aimeos_shop.controller'),
160
+			'madmin' => $this->container->getParameter('aimeos_shop.madmin'),
161
+			'mshop' => $this->container->getParameter('aimeos_shop.mshop'),
162
+			'resource' => $this->container->getParameter('aimeos_shop.resource'),
163 163
 		);
164 164
 
165
-		return new \Aimeos\MW\Config\Decorator\Memory( $conf, $local );
165
+		return new \Aimeos\MW\Config\Decorator\Memory($conf, $local);
166 166
 	}
167 167
 
168 168
 
@@ -172,19 +172,19 @@  discard block
 block discarded – undo
172 172
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
173 173
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
174 174
 	 */
175
-	protected function getLocale( \Aimeos\MShop\Context\Item\Iface $context )
175
+	protected function getLocale(\Aimeos\MShop\Context\Item\Iface $context)
176 176
 	{
177
-		if( $this->locale === null )
177
+		if ($this->locale === null)
178 178
 		{
179
-			$status = $this->container->getParameter( 'aimeos_shop.disable_sites' );
179
+			$status = $this->container->getParameter('aimeos_shop.disable_sites');
180 180
 			$attr = $this->requestStack->getMasterRequest()->attributes;
181 181
 
182
-			$site = $attr->get( 'site', 'default' );
183
-			$lang = $attr->get( 'locale', '' );
184
-			$currency = $attr->get( 'currency', '' );
182
+			$site = $attr->get('site', 'default');
183
+			$lang = $attr->get('locale', '');
184
+			$currency = $attr->get('currency', '');
185 185
 
186
-			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
187
-			$this->locale = $localeManager->bootstrap( $site, $lang, $currency, $status );
186
+			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
187
+			$this->locale = $localeManager->bootstrap($site, $lang, $currency, $status);
188 188
 		}
189 189
 
190 190
 		return $this->locale;
Please login to merge, or discard this patch.
Controller/JsonadmController.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 	 * @param integer|null $id Unique resource ID
33 33
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
34 34
 	 */
35
-	public function deleteAction( Request $request, $resource, $site = 'default', $id = null )
35
+	public function deleteAction(Request $request, $resource, $site = 'default', $id = null)
36 36
 	{
37 37
 		$status = 500;
38 38
 		$header = $request->headers->all();
39 39
 
40
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
41
-		$result = $cntl->delete( $request->getContent(), $header, $status );
40
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
41
+		$result = $cntl->delete($request->getContent(), $header, $status);
42 42
 
43
-		return $this->createResponse( $result, $status, $header );
43
+		return $this->createResponse($result, $status, $header);
44 44
 	}
45 45
 
46 46
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	 * @param integer|null $id Unique resource ID
54 54
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
55 55
 	 */
56
-	public function getAction( Request $request, $resource, $site = 'default', $id = null )
56
+	public function getAction(Request $request, $resource, $site = 'default', $id = null)
57 57
 	{
58 58
 		$status = 500;
59 59
 		$header = $request->headers->all();
60 60
 
61
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
62
-		$result = $cntl->get( $request->getContent(), $header, $status );
61
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
62
+		$result = $cntl->get($request->getContent(), $header, $status);
63 63
 
64
-		return $this->createResponse( $result, $status, $header );
64
+		return $this->createResponse($result, $status, $header);
65 65
 	}
66 66
 
67 67
 
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 	 * @param integer|null $id Unique resource ID
75 75
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
76 76
 	 */
77
-	public function patchAction( Request $request, $resource, $site = 'default', $id = null )
77
+	public function patchAction(Request $request, $resource, $site = 'default', $id = null)
78 78
 	{
79 79
 		$status = 500;
80 80
 		$header = $request->headers->all();
81 81
 
82
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
83
-		$result = $cntl->patch( $request->getContent(), $header, $status );
82
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
83
+		$result = $cntl->patch($request->getContent(), $header, $status);
84 84
 
85
-		return $this->createResponse( $result, $status, $header );
85
+		return $this->createResponse($result, $status, $header);
86 86
 	}
87 87
 
88 88
 
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 	 * @param integer $id Unique ID of the resource
96 96
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
97 97
 	 */
98
-	public function postAction( Request $request, $resource, $site = 'default', $id = null )
98
+	public function postAction(Request $request, $resource, $site = 'default', $id = null)
99 99
 	{
100 100
 		$status = 500;
101 101
 		$header = $request->headers->all();
102 102
 
103
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
104
-		$result = $cntl->post( $request->getContent(), $header, $status );
103
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
104
+		$result = $cntl->post($request->getContent(), $header, $status);
105 105
 
106
-		return $this->createResponse( $result, $status, $header );
106
+		return $this->createResponse($result, $status, $header);
107 107
 	}
108 108
 
109 109
 
@@ -116,15 +116,15 @@  discard block
 block discarded – undo
116 116
 	 * @param integer|null $id Unique resource ID
117 117
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
118 118
 	 */
119
-	public function putAction( Request $request, $resource, $site = 'default', $id = null )
119
+	public function putAction(Request $request, $resource, $site = 'default', $id = null)
120 120
 	{
121 121
 		$status = 500;
122 122
 		$header = $request->headers->all();
123 123
 
124
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
125
-		$result = $cntl->put( $request->getContent(), $header, $status );
124
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
125
+		$result = $cntl->put($request->getContent(), $header, $status);
126 126
 
127
-		return $this->createResponse( $result, $status, $header );
127
+		return $this->createResponse($result, $status, $header);
128 128
 	}
129 129
 
130 130
 
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
 	 * @param string $sitecode Unique site code
137 137
 	 * @return \Symfony\Component\HttpFoundation\Response Response object containing the generated output
138 138
 	 */
139
-	public function optionsAction( Request $request, $resource = '', $site = 'default' )
139
+	public function optionsAction(Request $request, $resource = '', $site = 'default')
140 140
 	{
141 141
 		$status = 500;
142 142
 		$header = $request->headers->all();
143 143
 
144
-		$cntl = $this->createController( $site, $resource, $request->get( 'lang', 'en' ) );
145
-		$result = $cntl->options( $request->getContent(), $header, $status );
144
+		$cntl = $this->createController($site, $resource, $request->get('lang', 'en'));
145
+		$result = $cntl->options($request->getContent(), $header, $status);
146 146
 
147
-		return $this->createResponse( $result, $status, $header );
147
+		return $this->createResponse($result, $status, $header);
148 148
 	}
149 149
 
150 150
 
@@ -156,18 +156,18 @@  discard block
 block discarded – undo
156 156
 	 * @param string $lang Language code
157 157
 	 * @return \Aimeos\MShop\Context\Item\Iface Context item
158 158
 	 */
159
-	protected function createController( $sitecode, $resource, $lang )
159
+	protected function createController($sitecode, $resource, $lang)
160 160
 	{
161
-		$aimeos = $this->get( 'aimeos' )->get();
162
-		$templatePaths = $aimeos->getCustomPaths( 'controller/jsonadm/templates' );
161
+		$aimeos = $this->get('aimeos')->get();
162
+		$templatePaths = $aimeos->getCustomPaths('controller/jsonadm/templates');
163 163
 
164
-		$context = $this->get( 'aimeos_context' )->get( false );
165
-		$context = $this->setLocale( $context, $sitecode, $lang );
164
+		$context = $this->get('aimeos_context')->get(false);
165
+		$context = $this->setLocale($context, $sitecode, $lang);
166 166
 
167
-		$view = $this->get('aimeos_view')->create( $context->getConfig(), $templatePaths, $lang );
168
-		$context->setView( $view );
167
+		$view = $this->get('aimeos_view')->create($context->getConfig(), $templatePaths, $lang);
168
+		$context->setView($view);
169 169
 
170
-		return \Aimeos\Controller\JsonAdm\Factory::createController( $context, $templatePaths, $resource );
170
+		return \Aimeos\Controller\JsonAdm\Factory::createController($context, $templatePaths, $resource);
171 171
 	}
172 172
 
173 173
 
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
 	 * @param array $header List of HTTP headers
180 180
 	 * @return \Illuminate\Http\Response HTTP response object
181 181
 	 */
182
-	protected function createResponse( $content, $status, array $header )
182
+	protected function createResponse($content, $status, array $header)
183 183
 	{
184 184
 		$response = new Response();
185
-		$response->setContent( $content );
186
-		$response->setStatusCode( $status );
185
+		$response->setContent($content);
186
+		$response->setStatusCode($status);
187 187
 
188
-		foreach( $header as $key => $value ) {
189
-			$response->headers->set( $key, $value );
188
+		foreach ($header as $key => $value) {
189
+			$response->headers->set($key, $value);
190 190
 		}
191 191
 
192 192
 		return $response;
@@ -201,23 +201,23 @@  discard block
 block discarded – undo
201 201
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
202 202
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
203 203
 	 */
204
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang )
204
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang)
205 205
 	{
206
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
206
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
207 207
 
208 208
 		try
209 209
 		{
210
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
211
-			$localeItem->setLanguageId( null );
212
-			$localeItem->setCurrencyId( null );
210
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
211
+			$localeItem->setLanguageId(null);
212
+			$localeItem->setCurrencyId(null);
213 213
 		}
214
-		catch( \Aimeos\MShop\Locale\Exception $e )
214
+		catch (\Aimeos\MShop\Locale\Exception $e)
215 215
 		{
216 216
 			$localeItem = $localeManager->createItem();
217 217
 		}
218 218
 
219
-		$context->setLocale( $localeItem );
220
-		$context->setI18n( $this->get('aimeos_i18n')->get( array( $lang ) ) );
219
+		$context->setLocale($localeItem);
220
+		$context->setI18n($this->get('aimeos_i18n')->get(array($lang)));
221 221
 
222 222
 		return $context;
223 223
 	}
Please login to merge, or discard this patch.
Controller/CheckoutController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function confirmAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-confirm' );
32
-		return $this->render( 'AimeosShopBundle:Checkout:confirm.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('checkout-confirm');
32
+		return $this->render('AimeosShopBundle:Checkout:confirm.html.twig', $params);
33 33
 	}
34 34
 
35 35
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function indexAction()
42 42
 	{
43
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-index' );
44
-		return $this->render( 'AimeosShopBundle:Checkout:index.html.twig', $params );
43
+		$params = $this->get('aimeos_page')->getSections('checkout-index');
44
+		return $this->render('AimeosShopBundle:Checkout:index.html.twig', $params);
45 45
 	}
46 46
 
47 47
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function updateAction()
54 54
 	{
55
-		$params = $this->get( 'aimeos_page' )->getSections( 'checkout-update' );
56
-		return $this->render( 'AimeosShopBundle:Checkout:update.html.twig', $params );
55
+		$params = $this->get('aimeos_page')->getSections('checkout-update');
56
+		return $this->render('AimeosShopBundle:Checkout:update.html.twig', $params);
57 57
 	}
58 58
 }
Please login to merge, or discard this patch.
Controller/BasketController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'basket-index' );
32
-		return $this->render( 'AimeosShopBundle:Basket:index.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('basket-index');
32
+		return $this->render('AimeosShopBundle:Basket:index.html.twig', $params);
33 33
 	}
34 34
 }
Please login to merge, or discard this patch.
Controller/AdminController.php 1 patch
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -30,54 +30,54 @@  discard block
 block discarded – undo
30 30
 	 * @param integer $tab Number of the currently active tab
31 31
 	 * @return \Symfony\Component\HttpFoundation\Response HTML page for the admin interface
32 32
 	 */
33
-	public function indexAction( $site, $lang, $tab )
33
+	public function indexAction($site, $lang, $tab)
34 34
 	{
35
-		$context = $this->get( 'aimeos_context' )->get( false );
36
-		$context = $this->setLocale( $context, $site, $lang );
35
+		$context = $this->get('aimeos_context')->get(false);
36
+		$context = $this->setLocale($context, $site, $lang);
37 37
 
38
-		$aimeos = $this->get( 'aimeos' )->get();
39
-		$cntlPaths = $aimeos->getCustomPaths( 'controller/extjs' );
40
-		$controller = new \Aimeos\Controller\ExtJS\JsonRpc( $context, $cntlPaths );
38
+		$aimeos = $this->get('aimeos')->get();
39
+		$cntlPaths = $aimeos->getCustomPaths('controller/extjs');
40
+		$controller = new \Aimeos\Controller\ExtJS\JsonRpc($context, $cntlPaths);
41 41
 		$cssFiles = array();
42 42
 
43
-		foreach( $aimeos->getCustomPaths( 'admin/extjs' ) as $base => $paths )
43
+		foreach ($aimeos->getCustomPaths('admin/extjs') as $base => $paths)
44 44
 		{
45
-			foreach( $paths as $path )
45
+			foreach ($paths as $path)
46 46
 			{
47 47
 				$jsbAbsPath = $base . '/' . $path;
48 48
 
49
-				if( !is_file( $jsbAbsPath ) ) {
50
-					throw new \Exception( sprintf( 'JSB2 file "%1$s" not found', $jsbAbsPath ) );
49
+				if (!is_file($jsbAbsPath)) {
50
+					throw new \Exception(sprintf('JSB2 file "%1$s" not found', $jsbAbsPath));
51 51
 				}
52 52
 
53
-				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $path ) );
54
-				$cssFiles = array_merge( $cssFiles, $jsb2->getUrls( 'css' ) );
53
+				$jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, dirname($path));
54
+				$cssFiles = array_merge($cssFiles, $jsb2->getUrls('css'));
55 55
 			}
56 56
 		}
57 57
 
58
-		$params = array( 'site' => '{site}', 'lang' => '{lang}', 'tab' => '{tab}' );
59
-		$adminUrl = $this->generateUrl( 'aimeos_shop_admin', $params );
58
+		$params = array('site' => '{site}', 'lang' => '{lang}', 'tab' => '{tab}');
59
+		$adminUrl = $this->generateUrl('aimeos_shop_admin', $params);
60 60
 
61
-		$token = $this->get( 'security.csrf.token_manager' )->getToken( 'aimeos_admin_token' )->getValue();
62
-		$jsonUrl = $this->generateUrl( 'aimeos_shop_admin_json', array( '_token' => $token ) );
61
+		$token = $this->get('security.csrf.token_manager')->getToken('aimeos_admin_token')->getValue();
62
+		$jsonUrl = $this->generateUrl('aimeos_shop_admin_json', array('_token' => $token));
63 63
 
64 64
 		$vars = array(
65 65
 			'lang' => $lang,
66 66
 			'cssFiles' => $cssFiles,
67
-			'languages' => $this->getJsonLanguages( $context),
68
-			'config' => $this->getJsonClientConfig( $context ),
69
-			'site' => $this->getJsonSiteItem( $context, $site ),
70
-			'i18nContent' => $this->getJsonClientI18n( $aimeos->getI18nPaths(), $lang ),
67
+			'languages' => $this->getJsonLanguages($context),
68
+			'config' => $this->getJsonClientConfig($context),
69
+			'site' => $this->getJsonSiteItem($context, $site),
70
+			'i18nContent' => $this->getJsonClientI18n($aimeos->getI18nPaths(), $lang),
71 71
 			'searchSchemas' => $controller->getJsonSearchSchemas(),
72 72
 			'itemSchemas' => $controller->getJsonItemSchemas(),
73
-			'smd' => $controller->getJsonSmd( $jsonUrl ),
74
-			'urlTemplate' => urldecode( $adminUrl ),
75
-			'uploaddir' => $this->container->getParameter( 'aimeos_shop.uploaddir' ),
73
+			'smd' => $controller->getJsonSmd($jsonUrl),
74
+			'urlTemplate' => urldecode($adminUrl),
75
+			'uploaddir' => $this->container->getParameter('aimeos_shop.uploaddir'),
76 76
 			'version' => $this->getVersion(),
77 77
 			'activeTab' => $tab,
78 78
 		);
79 79
 
80
-		return $this->render( 'AimeosShopBundle:Admin:index.html.twig', $vars );
80
+		return $this->render('AimeosShopBundle:Admin:index.html.twig', $vars);
81 81
 	}
82 82
 
83 83
 
@@ -87,22 +87,22 @@  discard block
 block discarded – undo
87 87
 	 * @param Request $request Symfony request object
88 88
 	 * @return \Symfony\Component\HttpFoundation\Response 2.0 RPC message response
89 89
 	 */
90
-	public function doAction( Request $request )
90
+	public function doAction(Request $request)
91 91
 	{
92 92
 		$csrfProvider = $this->get('security.csrf.token_manager');
93 93
 
94
-		if( $csrfProvider->isTokenValid( new CsrfToken( 'aimeos_admin_token',  $request->query->get( '_token' ) ) ) !== true ) {
95
-			throw new \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException( 'CSRF token is invalid' );
94
+		if ($csrfProvider->isTokenValid(new CsrfToken('aimeos_admin_token', $request->query->get('_token'))) !== true) {
95
+			throw new \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException('CSRF token is invalid');
96 96
 		}
97 97
 
98
-		$cntlPaths = $this->get( 'aimeos' )->get()->getCustomPaths( 'controller/extjs' );
99
-		$context = $this->get( 'aimeos_context' )->get( false );
100
-		$context = $this->setLocale( $context );
98
+		$cntlPaths = $this->get('aimeos')->get()->getCustomPaths('controller/extjs');
99
+		$context = $this->get('aimeos_context')->get(false);
100
+		$context = $this->setLocale($context);
101 101
 
102
-		$controller = new \Aimeos\Controller\ExtJS\JsonRpc( $context, $cntlPaths );
102
+		$controller = new \Aimeos\Controller\ExtJS\JsonRpc($context, $cntlPaths);
103 103
 
104
-		$response = $controller->process( $request->request->all(), 'php://input' );
105
-		return $this->render( 'AimeosShopBundle:Admin:do.html.twig', array( 'output' => $response ) );
104
+		$response = $controller->process($request->request->all(), 'php://input');
105
+		return $this->render('AimeosShopBundle:Admin:do.html.twig', array('output' => $response));
106 106
 	}
107 107
 
108 108
 
@@ -115,27 +115,27 @@  discard block
 block discarded – undo
115 115
 	{
116 116
 		$contents = '';
117 117
 		$jsFiles = array();
118
-		$aimeos = $this->get( 'aimeos' )->get();
118
+		$aimeos = $this->get('aimeos')->get();
119 119
 
120
-		foreach( $aimeos->getCustomPaths( 'admin/extjs' ) as $base => $paths )
120
+		foreach ($aimeos->getCustomPaths('admin/extjs') as $base => $paths)
121 121
 		{
122
-			foreach( $paths as $path )
122
+			foreach ($paths as $path)
123 123
 			{
124 124
 				$jsbAbsPath = $base . '/' . $path;
125
-				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $jsbAbsPath ) );
126
-				$jsFiles = array_merge( $jsFiles, $jsb2->getUrls( 'js', '' ) );
125
+				$jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, dirname($jsbAbsPath));
126
+				$jsFiles = array_merge($jsFiles, $jsb2->getUrls('js', ''));
127 127
 			}
128 128
 		}
129 129
 
130
-		foreach( $jsFiles as $file )
130
+		foreach ($jsFiles as $file)
131 131
 		{
132
-			if( ( $content = file_get_contents( $file ) ) !== false ) {
132
+			if (($content = file_get_contents($file)) !== false) {
133 133
 				$contents .= $content;
134 134
 			}
135 135
 		}
136 136
 
137
-		$response = new Response( $contents );
138
-		$response->headers->set( 'Content-Type', 'application/javascript' );
137
+		$response = new Response($contents);
138
+		$response->headers->set('Content-Type', 'application/javascript');
139 139
 
140 140
 		return $response;
141 141
 	}
@@ -147,30 +147,30 @@  discard block
 block discarded – undo
147 147
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
148 148
 	 * @return array List of language IDs with labels
149 149
 	 */
150
-	protected function getJsonLanguages( \Aimeos\MShop\Context\Item\Iface $context )
150
+	protected function getJsonLanguages(\Aimeos\MShop\Context\Item\Iface $context)
151 151
 	{
152
-		$paths = $this->get( 'aimeos' )->get()->getI18nPaths();
152
+		$paths = $this->get('aimeos')->get()->getI18nPaths();
153 153
 		$langs = array();
154 154
 
155
-		if( !isset( $paths['admin'] ) ) {
156
-			return json_encode( array() );
155
+		if (!isset($paths['admin'])) {
156
+			return json_encode(array());
157 157
 		}
158 158
 
159
-		foreach( $paths['admin'] as $path )
159
+		foreach ($paths['admin'] as $path)
160 160
 		{
161
-			$iter = new \DirectoryIterator( $path );
161
+			$iter = new \DirectoryIterator($path);
162 162
 
163
-			foreach( $iter as $file )
163
+			foreach ($iter as $file)
164 164
 			{
165 165
 				$name = $file->getFilename();
166 166
 
167
-				if( preg_match('/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) {
167
+				if (preg_match('/^[a-z]{2,3}(_[A-Z]{2})?$/', $name)) {
168 168
 					$langs[$name] = null;
169 169
 				}
170 170
 			}
171 171
 		}
172 172
 
173
-		return json_encode( $this->getLanguages( $context, array_keys( $langs ) ) );
173
+		return json_encode($this->getLanguages($context, array_keys($langs)));
174 174
 	}
175 175
 
176 176
 
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context item object
181 181
 	 * @return string JSON encoded configuration object
182 182
 	 */
183
-	protected function getJsonClientConfig( \Aimeos\MShop\Context\Item\Iface $context )
183
+	protected function getJsonClientConfig(\Aimeos\MShop\Context\Item\Iface $context)
184 184
 	{
185
-		$config = $context->getConfig()->get( 'admin/extjs', array() );
186
-		return json_encode( array( 'admin' => array( 'extjs' => $config ) ), JSON_FORCE_OBJECT );
185
+		$config = $context->getConfig()->get('admin/extjs', array());
186
+		return json_encode(array('admin' => array('extjs' => $config)), JSON_FORCE_OBJECT);
187 187
 	}
188 188
 
189 189
 
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
 	 * @param string $lang ISO language code like "en" or "en_GB"
195 195
 	 * @return string JSON encoded translation object
196 196
 	 */
197
-	protected function getJsonClientI18n( array $i18nPaths, $lang )
197
+	protected function getJsonClientI18n(array $i18nPaths, $lang)
198 198
 	{
199
-		$i18n = new \Aimeos\MW\Translation\Zend2( $i18nPaths, 'gettext', $lang, array( 'disableNotices' => true ) );
199
+		$i18n = new \Aimeos\MW\Translation\Zend2($i18nPaths, 'gettext', $lang, array('disableNotices' => true));
200 200
 
201 201
 		$content = array(
202
-			'admin' => $i18n->getAll( 'admin' ),
203
-			'admin/ext' => $i18n->getAll( 'admin/ext' ),
202
+			'admin' => $i18n->getAll('admin'),
203
+			'admin/ext' => $i18n->getAll('admin/ext'),
204 204
 		);
205 205
 
206
-		return json_encode( $content, JSON_FORCE_OBJECT );
206
+		return json_encode($content, JSON_FORCE_OBJECT);
207 207
 	}
208 208
 
209 209
 
@@ -215,19 +215,19 @@  discard block
 block discarded – undo
215 215
 	 * @return string JSON encoded site item object
216 216
 	 * @throws Exception If no site item was found for the code
217 217
 	 */
218
-	protected function getJsonSiteItem( \Aimeos\MShop\Context\Item\Iface $context, $site )
218
+	protected function getJsonSiteItem(\Aimeos\MShop\Context\Item\Iface $context, $site)
219 219
 	{
220
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'locale/site' );
220
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'locale/site');
221 221
 
222 222
 		$criteria = $manager->createSearch();
223
-		$criteria->setConditions( $criteria->compare( '==', 'locale.site.code', $site ) );
224
-		$items = $manager->searchItems( $criteria );
223
+		$criteria->setConditions($criteria->compare('==', 'locale.site.code', $site));
224
+		$items = $manager->searchItems($criteria);
225 225
 
226
-		if( ( $item = reset( $items ) ) === false ) {
227
-			throw new \Exception( sprintf( 'No site found for code "%1$s"', $site ) );
226
+		if (($item = reset($items)) === false) {
227
+			throw new \Exception(sprintf('No site found for code "%1$s"', $site));
228 228
 		}
229 229
 
230
-		return json_encode( $item->toArray() );
230
+		return json_encode($item->toArray());
231 231
 	}
232 232
 
233 233
 
@@ -238,18 +238,18 @@  discard block
 block discarded – undo
238 238
 	 * @param array $langIds List of language IDs
239 239
 	 * @return array List of associative lists with "id" and "label" as keys
240 240
 	 */
241
-	protected function getLanguages( \Aimeos\MShop\Context\Item\Iface $context, array $langIds )
241
+	protected function getLanguages(\Aimeos\MShop\Context\Item\Iface $context, array $langIds)
242 242
 	{
243
-		$languageManager = \Aimeos\MShop\Factory::createManager( $context, 'locale/language' );
243
+		$languageManager = \Aimeos\MShop\Factory::createManager($context, 'locale/language');
244 244
 		$result = array();
245 245
 
246 246
 		$search = $languageManager->createSearch();
247
-		$search->setConditions( $search->compare('==', 'locale.language.id', $langIds ) );
248
-		$search->setSortations( array( $search->sort( '-', 'locale.language.status' ), $search->sort( '+', 'locale.language.label' ) ) );
249
-		$langItems = $languageManager->searchItems( $search );
247
+		$search->setConditions($search->compare('==', 'locale.language.id', $langIds));
248
+		$search->setSortations(array($search->sort('-', 'locale.language.status'), $search->sort('+', 'locale.language.label')));
249
+		$langItems = $languageManager->searchItems($search);
250 250
 
251
-		foreach( $langItems as $id => $item ) {
252
-			$result[] = array( 'id' => $id, 'label' => $item->getLabel() );
251
+		foreach ($langItems as $id => $item) {
252
+			$result[] = array('id' => $id, 'label' => $item->getLabel());
253 253
 		}
254 254
 
255 255
 		return $result;
@@ -263,14 +263,14 @@  discard block
 block discarded – undo
263 263
 	 */
264 264
 	protected function getVersion()
265 265
 	{
266
-		$filename = dirname( $this->get( 'kernel' )->getRootDir() ) . DIRECTORY_SEPARATOR . 'composer.lock';
266
+		$filename = dirname($this->get('kernel')->getRootDir()) . DIRECTORY_SEPARATOR . 'composer.lock';
267 267
 
268
-		if( file_exists( $filename ) === true && ( $content = file_get_contents( $filename ) ) !== false
269
-			&& ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] )
268
+		if (file_exists($filename) === true && ($content = file_get_contents($filename)) !== false
269
+			&& ($content = json_decode($content, true)) !== null && isset($content['packages'])
270 270
 		) {
271
-			foreach( (array) $content['packages'] as $item )
271
+			foreach ((array) $content['packages'] as $item)
272 272
 			{
273
-				if( $item['name'] === 'aimeos/aimeos-symfony2' ) {
273
+				if ($item['name'] === 'aimeos/aimeos-symfony2') {
274 274
 					return $item['version'];
275 275
 				}
276 276
 			}
@@ -288,17 +288,17 @@  discard block
 block discarded – undo
288 288
 	 * @param string $locale ISO language code, e.g. "en" or "en_GB"
289 289
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
290 290
 	 */
291
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $locale = null )
291
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode = 'default', $locale = null)
292 292
 	{
293
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
293
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
294 294
 
295 295
 		try {
296
-			$localeItem = $localeManager->bootstrap( $sitecode, $locale, '', false );
297
-		} catch( \Aimeos\MShop\Locale\Exception $e ) {
296
+			$localeItem = $localeManager->bootstrap($sitecode, $locale, '', false);
297
+		} catch (\Aimeos\MShop\Locale\Exception $e) {
298 298
 			$localeItem = $localeManager->createItem();
299 299
 		}
300 300
 
301
-		$context->setLocale( $localeItem );
301
+		$context->setLocale($localeItem);
302 302
 
303 303
 		return $context;
304 304
 	}
Please login to merge, or discard this patch.
Controller/CatalogController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function countAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-count' );
32
-		return $this->render( 'AimeosShopBundle:Catalog:count.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('catalog-count');
32
+		return $this->render('AimeosShopBundle:Catalog:count.html.twig', $params);
33 33
 	}
34 34
 
35 35
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function detailAction()
42 42
 	{
43
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-detail' );
44
-		return $this->render( 'AimeosShopBundle:Catalog:detail.html.twig', $params );
43
+		$params = $this->get('aimeos_page')->getSections('catalog-detail');
44
+		return $this->render('AimeosShopBundle:Catalog:detail.html.twig', $params);
45 45
 	}
46 46
 
47 47
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function listAction()
54 54
 	{
55
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-list' );
56
-		return $this->render( 'AimeosShopBundle:Catalog:list.html.twig', $params );
55
+		$params = $this->get('aimeos_page')->getSections('catalog-list');
56
+		return $this->render('AimeosShopBundle:Catalog:list.html.twig', $params);
57 57
 	}
58 58
 
59 59
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function stockAction()
66 66
 	{
67
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-stock' );
68
-		return $this->render( 'AimeosShopBundle:Catalog:stock.html.twig', $params );
67
+		$params = $this->get('aimeos_page')->getSections('catalog-stock');
68
+		return $this->render('AimeosShopBundle:Catalog:stock.html.twig', $params);
69 69
 	}
70 70
 
71 71
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function suggestAction()
78 78
 	{
79
-		$params = $this->get( 'aimeos_page' )->getSections( 'catalog-suggest' );
80
-		return $this->render( 'AimeosShopBundle:Catalog:suggest.html.twig', $params );
79
+		$params = $this->get('aimeos_page')->getSections('catalog-suggest');
80
+		return $this->render('AimeosShopBundle:Catalog:suggest.html.twig', $params);
81 81
 	}
82 82
 }
Please login to merge, or discard this patch.
Controller/AccountController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	 */
29 29
 	public function indexAction()
30 30
 	{
31
-		$params = $this->get( 'aimeos_page' )->getSections( 'account-index' );
32
-		return $this->render( 'AimeosShopBundle:Account:index.html.twig', $params );
31
+		$params = $this->get('aimeos_page')->getSections('account-index');
32
+		return $this->render('AimeosShopBundle:Account:index.html.twig', $params);
33 33
 	}
34 34
 }
Please login to merge, or discard this patch.
Controller/PageController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	public function privacyAction()
30 30
 	{
31
-		return $this->render( 'AimeosShopBundle:Page:privacy.html.twig' );
31
+		return $this->render('AimeosShopBundle:Page:privacy.html.twig');
32 32
 	}
33 33
 
34 34
 
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	public function termsAction()
41 41
 	{
42
-		return $this->render( 'AimeosShopBundle:Page:terms.html.twig' );
42
+		return $this->render('AimeosShopBundle:Page:terms.html.twig');
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.