Completed
Push — master ( 4e3077...d2ec78 )
by Aimeos
15:45
created
src/Bootstrap.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @param \Slim\App $app Slim application
28 28
 	 * @param array $settings Multi-dimensional array of configuration settings
29 29
 	 */
30
-	public function __construct( \Slim\App $app, array $settings )
30
+	public function __construct(\Slim\App $app, array $settings)
31 31
 	{
32 32
 		$this->app = $app;
33 33
 		$this->settings = $settings;
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 	 * @param string $path Absolute or relative path to the Aimeos route file
41 41
 	 * @return \Aimeos\Slim\Bootstrap Self instance
42 42
 	 */
43
-	public function routes( $path )
43
+	public function routes($path)
44 44
 	{
45 45
 		$app = $this->app;
46 46
 		$settings = $this->settings;
47 47
 
48
-		$config = function( $key, $default ) use ( $settings )
48
+		$config = function($key, $default) use ($settings)
49 49
 		{
50
-			foreach( explode( '/', trim( $key, '/' ) ) as $part )
50
+			foreach (explode('/', trim($key, '/')) as $part)
51 51
 			{
52
-				if( isset( $settings[$part] ) ) {
52
+				if (isset($settings[$part])) {
53 53
 					$settings = $settings[$part];
54 54
 				} else {
55 55
 					return $default;
@@ -71,46 +71,46 @@  discard block
 block discarded – undo
71 71
 	 * @param string $extdir Absolute or relative path to the Aimeos extension directory
72 72
 	 * @return \Aimeos\Slim\Bootstrap Self instance
73 73
 	 */
74
-	public function setup( $extdir = '../ext' )
74
+	public function setup($extdir = '../ext')
75 75
 	{
76 76
 		$settings = $this->settings;
77 77
 		$container = $this->app->getContainer();
78 78
 
79
-		$container['aimeos'] = function( $c ) use ( $extdir ) {
80
-			return new \Aimeos\Bootstrap( (array) $extdir, false );
79
+		$container['aimeos'] = function($c) use ($extdir) {
80
+			return new \Aimeos\Bootstrap((array) $extdir, false);
81 81
 		};
82 82
 
83
-		$container['aimeos_context'] = function( $c ) {
84
-			return new \Aimeos\Slim\Base\Context( $c );
83
+		$container['aimeos_context'] = function($c) {
84
+			return new \Aimeos\Slim\Base\Context($c);
85 85
 		};
86 86
 
87
-		$container['aimeos_i18n'] = function( $c ) {
88
-			return new \Aimeos\Slim\Base\I18n( $c );
87
+		$container['aimeos_i18n'] = function($c) {
88
+			return new \Aimeos\Slim\Base\I18n($c);
89 89
 		};
90 90
 
91
-		$container['aimeos_page'] = function( $c ) {
92
-			return new \Aimeos\Slim\Base\Page( $c );
91
+		$container['aimeos_page'] = function($c) {
92
+			return new \Aimeos\Slim\Base\Page($c);
93 93
 		};
94 94
 
95
-		$container['aimeos_view'] = function( $c ) {
96
-			return new \Aimeos\Slim\Base\View( $c );
95
+		$container['aimeos_view'] = function($c) {
96
+			return new \Aimeos\Slim\Base\View($c);
97 97
 		};
98 98
 
99 99
 
100
-		$container['aimeos_config'] = function( $c ) use ( $settings ) {
100
+		$container['aimeos_config'] = function($c) use ($settings) {
101 101
 
102
-			$config = new \Aimeos\MW\Config\PHPArray( $settings, $c['aimeos']->getConfigPaths() );
102
+			$config = new \Aimeos\MW\Config\PHPArray($settings, $c['aimeos']->getConfigPaths());
103 103
 
104
-			if( function_exists( 'apc_store' ) === true && $config->get( 'apc_enabled', false ) == true ) {
105
-				$config = new \Aimeos\MW\Config\Decorator\APC( $config, $config->get( 'apc_prefix', 'slim:' ) );
104
+			if (function_exists('apc_store') === true && $config->get('apc_enabled', false) == true) {
105
+				$config = new \Aimeos\MW\Config\Decorator\APC($config, $config->get('apc_prefix', 'slim:'));
106 106
 			}
107 107
 
108 108
 			return $config;
109 109
 		};
110 110
 
111 111
 
112
-		$container['mailer'] = function( $c ) {
113
-			return \Swift_Mailer::newInstance( \Swift_SendmailTransport::newInstance() );
112
+		$container['mailer'] = function($c) {
113
+			return \Swift_Mailer::newInstance(\Swift_SendmailTransport::newInstance());
114 114
 		};
115 115
 
116 116
 		return $this;
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 	 */
125 125
 	public static function getVersion()
126 126
 	{
127
-		$basedir = dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) . DIRECTORY_SEPARATOR;
127
+		$basedir = dirname(dirname(dirname(dirname(__DIR__)))) . DIRECTORY_SEPARATOR;
128 128
 
129
-		if( ( $content = @file_get_contents( $basedir . 'composer.lock' ) ) !== false
130
-			&& ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] )
129
+		if (($content = @file_get_contents($basedir . 'composer.lock')) !== false
130
+			&& ($content = json_decode($content, true)) !== null && isset($content['packages'])
131 131
 		) {
132
-			foreach( (array) $content['packages'] as $item )
132
+			foreach ((array) $content['packages'] as $item)
133 133
 			{
134
-				if( $item['name'] === 'aimeos/aimeos-slim' ) {
134
+				if ($item['name'] === 'aimeos/aimeos-slim') {
135 135
 					return $item['version'];
136 136
 				}
137 137
 			}
Please login to merge, or discard this patch.
src/Base/Context.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @param ContainerInterface $container Dependency container
32 32
 	 */
33
-	public function __construct( ContainerInterface $container )
33
+	public function __construct(ContainerInterface $container)
34 34
 	{
35 35
 		$this->container = $container;
36 36
 	}
@@ -43,45 +43,45 @@  discard block
 block discarded – undo
43 43
 	 * @param array Associative list of URL parameter
44 44
 	 * @return \Aimeos\MShop\Context\Item\Iface Context object
45 45
 	 */
46
-	public function get( $locale = true, array $attributes = array() )
46
+	public function get($locale = true, array $attributes = array())
47 47
 	{
48
-		if( self::$context === null )
48
+		if (self::$context === null)
49 49
 		{
50 50
 			$context = new \Aimeos\MShop\Context\Item\Standard();
51 51
 
52
-			$config = $this->container->get( 'aimeos_config' );
53
-			$context->setConfig( $config );
52
+			$config = $this->container->get('aimeos_config');
53
+			$context->setConfig($config);
54 54
 
55
-			$dbm = new \Aimeos\MW\DB\Manager\PDO( $config );
56
-			$context->setDatabaseManager( $dbm );
55
+			$dbm = new \Aimeos\MW\DB\Manager\PDO($config);
56
+			$context->setDatabaseManager($dbm);
57 57
 
58
-			$fs = new \Aimeos\MW\Filesystem\Manager\Standard( $config );
59
-			$context->setFilesystemManager( $fs );
58
+			$fs = new \Aimeos\MW\Filesystem\Manager\Standard($config);
59
+			$context->setFilesystemManager($fs);
60 60
 
61
-			$mail = new \Aimeos\MW\Mail\Swift( $this->container->get( 'mailer' ) );
62
-			$context->setMail( $mail );
61
+			$mail = new \Aimeos\MW\Mail\Swift($this->container->get('mailer'));
62
+			$context->setMail($mail);
63 63
 
64
-			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager( $context );
65
-			$context->setLogger( $logger );
64
+			$logger = \Aimeos\MAdmin\Log\Manager\Factory::createManager($context);
65
+			$context->setLogger($logger);
66 66
 
67
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $context );
68
-			$context->setCache( $cache );
67
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($context);
68
+			$context->setCache($cache);
69 69
 
70 70
 			$session = new \Aimeos\MW\Session\PHP();
71
-			$context->setSession( $session );
71
+			$context->setSession($session);
72 72
 
73 73
 			self::$context = $context;
74 74
 		}
75 75
 
76 76
 		$context = self::$context;
77 77
 
78
-		if( $locale === true )
78
+		if ($locale === true)
79 79
 		{
80
-			$localeItem = $this->getLocale( $context, $attributes );
80
+			$localeItem = $this->getLocale($context, $attributes);
81 81
 			$langid = $localeItem->getLanguageId();
82 82
 
83
-			$context->setLocale( $localeItem );
84
-			$context->setI18n( $this->container->get( 'aimeos_i18n' )->get( array( $langid ) ) );
83
+			$context->setLocale($localeItem);
84
+			$context->setI18n($this->container->get('aimeos_i18n')->get(array($langid)));
85 85
 		}
86 86
 
87 87
 		return $context;
@@ -95,18 +95,18 @@  discard block
 block discarded – undo
95 95
 	 * @param array Associative list of URL parameter
96 96
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
97 97
 	 */
98
-	protected function getLocale( \Aimeos\MShop\Context\Item\Iface $context, array $attr )
98
+	protected function getLocale(\Aimeos\MShop\Context\Item\Iface $context, array $attr)
99 99
 	{
100
-		if( $this->locale === null )
100
+		if ($this->locale === null)
101 101
 		{
102
-			$disableSites = $this->container->get( 'aimeos_config' )->get( 'disableSites', false );
102
+			$disableSites = $this->container->get('aimeos_config')->get('disableSites', false);
103 103
 
104
-			$site = ( isset( $attr['site'] ) ? $attr['site'] : 'default' );
105
-			$lang = ( isset( $attr['locale'] ) ? $attr['locale'] : '' );
106
-			$currency = ( isset( $attr['currency'] ) ? $attr['currency'] : '' );
104
+			$site = (isset($attr['site']) ? $attr['site'] : 'default');
105
+			$lang = (isset($attr['locale']) ? $attr['locale'] : '');
106
+			$currency = (isset($attr['currency']) ? $attr['currency'] : '');
107 107
 
108
-			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
109
-			$this->locale = $localeManager->bootstrap( $site, $lang, $currency, $disableSites );
108
+			$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
109
+			$this->locale = $localeManager->bootstrap($site, $lang, $currency, $disableSites);
110 110
 		}
111 111
 
112 112
 		return $this->locale;
Please login to merge, or discard this patch.
src/Base/View.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @param ContainerInterface $container Dependency container
32 32
 	 */
33
-	public function __construct( ContainerInterface $container )
33
+	public function __construct(ContainerInterface $container)
34 34
 	{
35 35
 		$this->container = $container;
36 36
 	}
@@ -47,53 +47,53 @@  discard block
 block discarded – undo
47 47
 	 * @param string|null $locale Code of the current language or null for no translation
48 48
 	 * @return \Aimeos\MW\View\Iface View object
49 49
 	 */
50
-	public function create( ServerRequestInterface $request, ResponseInterface $response, array $attr, array $templatePaths, $locale = null )
50
+	public function create(ServerRequestInterface $request, ResponseInterface $response, array $attr, array $templatePaths, $locale = null)
51 51
 	{
52 52
 		$params = $fixed = array();
53
-		$config = $this->container->get( 'aimeos_config' );
53
+		$config = $this->container->get('aimeos_config');
54 54
 
55
-		if( $locale !== null )
55
+		if ($locale !== null)
56 56
 		{
57 57
 			$params = $attr + (array) $request->getParsedBody() + (array) $request->getQueryParams();
58
-			$fixed = $this->getFixedParams( $attr );
58
+			$fixed = $this->getFixedParams($attr);
59 59
 
60
-			$i18n = $this->container->get( 'aimeos_i18n' )->get( array( $locale ) );
60
+			$i18n = $this->container->get('aimeos_i18n')->get(array($locale));
61 61
 			$translation = $i18n[$locale];
62 62
 		}
63 63
 		else
64 64
 		{
65
-			$translation = new \Aimeos\MW\Translation\None( 'en' );
65
+			$translation = new \Aimeos\MW\Translation\None('en');
66 66
 		}
67 67
 
68 68
 
69
-		$view = new \Aimeos\MW\View\Standard( $templatePaths );
69
+		$view = new \Aimeos\MW\View\Standard($templatePaths);
70 70
 
71
-		$helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $translation );
72
-		$view->addHelper( 'translate', $helper );
71
+		$helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $translation);
72
+		$view->addHelper('translate', $helper);
73 73
 
74
-		$helper = new \Aimeos\MW\View\Helper\Url\Slim( $view, $this->container->get( 'router' ), $fixed );
75
-		$view->addHelper( 'url', $helper );
74
+		$helper = new \Aimeos\MW\View\Helper\Url\Slim($view, $this->container->get('router'), $fixed);
75
+		$view->addHelper('url', $helper);
76 76
 
77
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
78
-		$view->addHelper( 'param', $helper );
77
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $params);
78
+		$view->addHelper('param', $helper);
79 79
 
80
-		$helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config );
81
-		$view->addHelper( 'config', $helper );
80
+		$helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config);
81
+		$view->addHelper('config', $helper);
82 82
 
83
-		$sepDec = $config->get( 'client/html/common/format/seperatorDecimal', '.' );
84
-		$sep1000 = $config->get( 'client/html/common/format/seperator1000', ' ' );
85
-		$helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, $sepDec, $sep1000 );
86
-		$view->addHelper( 'number', $helper );
83
+		$sepDec = $config->get('client/html/common/format/seperatorDecimal', '.');
84
+		$sep1000 = $config->get('client/html/common/format/seperator1000', ' ');
85
+		$helper = new \Aimeos\MW\View\Helper\Number\Standard($view, $sepDec, $sep1000);
86
+		$view->addHelper('number', $helper);
87 87
 
88
-		$helper = new \Aimeos\MW\View\Helper\Request\Slim( $view, $request );
89
-		$view->addHelper( 'request', $helper );
88
+		$helper = new \Aimeos\MW\View\Helper\Request\Slim($view, $request);
89
+		$view->addHelper('request', $helper);
90 90
 
91
-		$helper = new \Aimeos\MW\View\Helper\Response\Slim( $view, $response );
92
-		$view->addHelper( 'response', $helper );
91
+		$helper = new \Aimeos\MW\View\Helper\Response\Slim($view, $response);
92
+		$view->addHelper('response', $helper);
93 93
 
94
-		$csrf = $request->getAttribute( 'csrf_name' );
95
-		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, $csrf, $request->getAttribute( 'csrf_value ') );
96
-		$view->addHelper( 'csrf', $helper );
94
+		$csrf = $request->getAttribute('csrf_name');
95
+		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, $csrf, $request->getAttribute('csrf_value '));
96
+		$view->addHelper('csrf', $helper);
97 97
 
98 98
 		return $view;
99 99
 	}
@@ -105,19 +105,19 @@  discard block
 block discarded – undo
105 105
 	 * @param array $attributes Associative list of route attributes
106 106
 	 * @return array Associative list of parameters with "site", "locale" and "currency" if available
107 107
 	 */
108
-	protected function getFixedParams( array $attributes )
108
+	protected function getFixedParams(array $attributes)
109 109
 	{
110 110
 		$fixed = array();
111 111
 
112
-		if( isset( $attributes['site'] ) ) {
112
+		if (isset($attributes['site'])) {
113 113
 			$fixed['site'] = $attributes['site'];
114 114
 		}
115 115
 
116
-		if( isset( $attributes['locale'] ) ) {
116
+		if (isset($attributes['locale'])) {
117 117
 			$fixed['locale'] = $attributes['locale'];
118 118
 		}
119 119
 
120
-		if( isset( $attributes['currency'] ) ) {
120
+		if (isset($attributes['currency'])) {
121 121
 			$fixed['currency'] = $attributes['currency'];
122 122
 		}
123 123
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 
60 60
 			$i18n = $this->container->get( 'aimeos_i18n' )->get( array( $locale ) );
61 61
 			$translation = $i18n[$locale];
62
-		}
63
-		else
62
+		} else
64 63
 		{
65 64
 			$translation = new \Aimeos\MW\Translation\None( 'en' );
66 65
 		}
Please login to merge, or discard this patch.
src/Base/Page.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @param ContainerInterface $container Dependency container
32 32
 	 */
33
-	public function __construct( ContainerInterface $container )
33
+	public function __construct(ContainerInterface $container)
34 34
 	{
35 35
 		$this->container = $container;
36 36
 	}
@@ -45,24 +45,24 @@  discard block
 block discarded – undo
45 45
 	 * @param array Associative list of URI attributes
46 46
 	 * @return array Associative list with body and header output separated by client name
47 47
 	 */
48
-	public function getSections( $pageName, ServerRequestInterface $request, ResponseInterface $response, array $attr )
48
+	public function getSections($pageName, ServerRequestInterface $request, ResponseInterface $response, array $attr)
49 49
 	{
50
-		$tmplPaths = $this->container->get( 'aimeos' )->getCustomPaths( 'client/html/templates' );
51
-		$context = $this->container->get( 'aimeos_context' )->get( true, $attr );
50
+		$tmplPaths = $this->container->get('aimeos')->getCustomPaths('client/html/templates');
51
+		$context = $this->container->get('aimeos_context')->get(true, $attr);
52 52
 		$langid = $context->getLocale()->getLanguageId();
53 53
 
54
-		$view = $this->container->get( 'aimeos_view' )->create( $request, $response, $attr, $tmplPaths, $langid );
55
-		$context->setView( $view );
54
+		$view = $this->container->get('aimeos_view')->create($request, $response, $attr, $tmplPaths, $langid);
55
+		$context->setView($view);
56 56
 
57
-		$pagesConfig = $this->container->get( 'aimeos_config' )->get( 'page', array() );
58
-		$result = array( 'aibody' => array(), 'aiheader' => array() );
57
+		$pagesConfig = $this->container->get('aimeos_config')->get('page', array());
58
+		$result = array('aibody' => array(), 'aiheader' => array());
59 59
 
60
-		if( isset( $pagesConfig[$pageName] ) )
60
+		if (isset($pagesConfig[$pageName]))
61 61
 		{
62
-			foreach( (array) $pagesConfig[$pageName] as $clientName )
62
+			foreach ((array) $pagesConfig[$pageName] as $clientName)
63 63
 			{
64
-				$client = \Aimeos\Client\Html\Factory::createClient( $context, $tmplPaths, $clientName );
65
-				$client->setView( clone $view );
64
+				$client = \Aimeos\Client\Html\Factory::createClient($context, $tmplPaths, $clientName);
65
+				$client->setView(clone $view);
66 66
 				$client->process();
67 67
 
68 68
 				$result['aibody'][$clientName] = $client->getBody();
Please login to merge, or discard this patch.
src/Base/I18n.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @param ContainerInterface $container Dependency container
31 31
 	 */
32
-	public function __construct( ContainerInterface $container )
32
+	public function __construct(ContainerInterface $container)
33 33
 	{
34 34
 		$this->container = $container;
35 35
 	}
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 	 * @param array $languageIds List of two letter ISO language IDs
42 42
 	 * @return \Aimeos\MW\Translation\Iface[] List of translation objects
43 43
 	 */
44
-	public function get( array $languageIds )
44
+	public function get(array $languageIds)
45 45
 	{
46
-		$config = $this->container->get( 'aimeos_config' );
47
-		$i18nPaths = $this->container->get( 'aimeos' )->getI18nPaths();
46
+		$config = $this->container->get('aimeos_config');
47
+		$i18nPaths = $this->container->get('aimeos')->getI18nPaths();
48 48
 
49
-		foreach( $languageIds as $langid )
49
+		foreach ($languageIds as $langid)
50 50
 		{
51
-			if( !isset( $this->i18n[$langid] ) )
51
+			if (!isset($this->i18n[$langid]))
52 52
 			{
53
-				$i18n = new \Aimeos\MW\Translation\Gettext( $i18nPaths, $langid );
53
+				$i18n = new \Aimeos\MW\Translation\Gettext($i18nPaths, $langid);
54 54
 
55
-				if( function_exists( 'apc_store' ) === true && $config->get( 'apc_enabled', false ) == true ) {
56
-					$i18n = new \Aimeos\MW\Translation\Decorator\APC( $i18n, $config->get( 'apc_prefix', 'slim:' ) );
55
+				if (function_exists('apc_store') === true && $config->get('apc_enabled', false) == true) {
56
+					$i18n = new \Aimeos\MW\Translation\Decorator\APC($i18n, $config->get('apc_prefix', 'slim:'));
57 57
 				}
58 58
 
59
-				if( ( $cfg = $config->get( 'i18n/' . $langid, array() ) ) !== array() ) {
60
-					$i18n = new \Aimeos\MW\Translation\Decorator\Memory( $i18n, $cfg );
59
+				if (($cfg = $config->get('i18n/' . $langid, array())) !== array()) {
60
+					$i18n = new \Aimeos\MW\Translation\Decorator\Memory($i18n, $cfg);
61 61
 				}
62 62
 
63 63
 				$this->i18n[$langid] = $i18n;
Please login to merge, or discard this patch.
src/Controller/Checkout.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	 * @param ResponseInterface $response Response object
31 31
 	 * @return ResponseInterface $response Modified response object with generated output
32 32
 	 */
33
-	public static function confirmAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
33
+	public static function confirmAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
34 34
 	{
35
-		$contents = $container->get( 'aimeos_page' )->getSections( 'checkout-confirm', $request, $response, $args );
36
-		return $container->get( 'view' )->render( $response, 'Checkout/confirm.html.twig', $contents );
35
+		$contents = $container->get('aimeos_page')->getSections('checkout-confirm', $request, $response, $args);
36
+		return $container->get('view')->render($response, 'Checkout/confirm.html.twig', $contents);
37 37
 	}
38 38
 
39 39
 
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 	 * @param ResponseInterface $response Response object
46 46
 	 * @return ResponseInterface $response Modified response object with generated output
47 47
 	 */
48
-	public static function indexAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
48
+	public static function indexAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
49 49
 	{
50
-		$contents = $container->get( 'aimeos_page' )->getSections( 'checkout-index', $request, $response, $args );
51
-		return $container->get( 'view' )->render( $response, 'Checkout/index.html.twig', $contents );
50
+		$contents = $container->get('aimeos_page')->getSections('checkout-index', $request, $response, $args);
51
+		return $container->get('view')->render($response, 'Checkout/index.html.twig', $contents);
52 52
 	}
53 53
 
54 54
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	 * @param ResponseInterface $response Response object
61 61
 	 * @return ResponseInterface $response Modified response object with generated output
62 62
 	 */
63
-	public static function updateAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
63
+	public static function updateAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
64 64
 	{
65
-		$contents = $container->get( 'aimeos_page' )->getSections( 'checkout-update', $request, $response, $args );
66
-		return $container->get( 'view' )->render( $response, 'Checkout/update.html.twig', $contents );
65
+		$contents = $container->get('aimeos_page')->getSections('checkout-update', $request, $response, $args);
66
+		return $container->get('view')->render($response, 'Checkout/update.html.twig', $contents);
67 67
 	}
68 68
 }
69 69
\ No newline at end of file
Please login to merge, or discard this patch.
src/Controller/Basket.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
 	 * @param ResponseInterface $response Response object
31 31
 	 * @return ResponseInterface $response Modified response object with generated output
32 32
 	 */
33
-	public static function indexAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
33
+	public static function indexAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
34 34
 	{
35
-		$contents = $container->get( 'aimeos_page' )->getSections( 'basket-index', $request, $response, $args );
36
-		return $container->get( 'view' )->render( $response, 'Basket/index.html.twig', $contents );
35
+		$contents = $container->get('aimeos_page')->getSections('basket-index', $request, $response, $args);
36
+		return $container->get('view')->render($response, 'Basket/index.html.twig', $contents);
37 37
 	}
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
src/Controller/Account.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	 * @param ResponseInterface $response Response object
31 31
 	 * @return ResponseInterface $response Modified response object with generated output
32 32
 	 */
33
-	public static function indexAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
33
+	public static function indexAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
34 34
 	{
35
-		$contents = $container->get( 'aimeos_page' )->getSections( 'account-index', $request, $response, $args );
36
-		return $container->get( 'view' )->render( $response, 'Account/index.html.twig', $contents );
35
+		$contents = $container->get('aimeos_page')->getSections('account-index', $request, $response, $args);
36
+		return $container->get('view')->render($response, 'Account/index.html.twig', $contents);
37 37
 	}
38 38
 
39 39
 
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 	 * @param ResponseInterface $response Response object
46 46
 	 * @return ResponseInterface $response Modified response object with generated output
47 47
 	 */
48
-	public static function downloadAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
48
+	public static function downloadAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
49 49
 	{
50
-		$context = $container->get( 'aimeos_context' )->get( true, $args );
50
+		$context = $container->get('aimeos_context')->get(true, $args);
51 51
 		$langid = $context->getLocale()->getLanguageId();
52 52
 
53
-		$view = $container->get( 'aimeos_view' )->create( $request, $response, $args, array(), $langid );
54
-		$context->setView( $view );
53
+		$view = $container->get('aimeos_view')->create($request, $response, $args, array(), $langid);
54
+		$context->setView($view);
55 55
 
56
-		$client = \Aimeos\Client\Html\Factory::createClient( $context, array(), 'account/download' );
57
-		$client->setView( $view );
56
+		$client = \Aimeos\Client\Html\Factory::createClient($context, array(), 'account/download');
57
+		$client->setView($view);
58 58
 		$client->process();
59 59
 
60 60
 		return $view->response();
Please login to merge, or discard this patch.
src/Controller/Catalog.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 	 * @param ResponseInterface $response Response object
31 31
 	 * @return ResponseInterface $response Modified response object with generated output
32 32
 	 */
33
-	public static function countAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
33
+	public static function countAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
34 34
 	{
35
-		$contents = $container->get( 'aimeos_page' )->getSections( 'catalog-count', $request, $response, $args );
35
+		$contents = $container->get('aimeos_page')->getSections('catalog-count', $request, $response, $args);
36 36
 
37
-		$response = $response->withStatus( 200 );
38
-		$response = $response->withHeader( 'Content-Type', 'application/javascript' );
37
+		$response = $response->withStatus(200);
38
+		$response = $response->withHeader('Content-Type', 'application/javascript');
39 39
 
40
-		return $container->get( 'view' )->render( $response, 'Catalog/count.html.twig', $contents );
40
+		return $container->get('view')->render($response, 'Catalog/count.html.twig', $contents);
41 41
 	}
42 42
 
43 43
 
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 	 * @param ResponseInterface $response Response object
50 50
 	 * @return ResponseInterface $response Modified response object with generated output
51 51
 	 */
52
-	public static function detailAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
52
+	public static function detailAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
53 53
 	{
54
-		$contents = $container->get( 'aimeos_page' )->getSections( 'catalog-detail', $request, $response, $args );
55
-		return $container->get( 'view' )->render( $response, 'Catalog/detail.html.twig', $contents );
54
+		$contents = $container->get('aimeos_page')->getSections('catalog-detail', $request, $response, $args);
55
+		return $container->get('view')->render($response, 'Catalog/detail.html.twig', $contents);
56 56
 	}
57 57
 
58 58
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 	 * @param ResponseInterface $response Response object
65 65
 	 * @return ResponseInterface $response Modified response object with generated output
66 66
 	 */
67
-	public static function listAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
67
+	public static function listAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
68 68
 	{
69
-		$contents = $container->get( 'aimeos_page' )->getSections( 'catalog-list', $request, $response, $args );
70
-		return $container->get( 'view' )->render( $response, 'Catalog/list.html.twig', $contents );
69
+		$contents = $container->get('aimeos_page')->getSections('catalog-list', $request, $response, $args);
70
+		return $container->get('view')->render($response, 'Catalog/list.html.twig', $contents);
71 71
 	}
72 72
 
73 73
 
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
 	 * @param ResponseInterface $response Response object
80 80
 	 * @return ResponseInterface $response Modified response object with generated output
81 81
 	 */
82
-	public static function stockAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
82
+	public static function stockAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
83 83
 	{
84
-		$contents = $container->get( 'aimeos_page' )->getSections( 'catalog-stock', $request, $response, $args );
84
+		$contents = $container->get('aimeos_page')->getSections('catalog-stock', $request, $response, $args);
85 85
 
86
-		$response = $response->withStatus( 200 );
87
-		$response = $response->withHeader( 'Content-Type', 'application/javascript' );
86
+		$response = $response->withStatus(200);
87
+		$response = $response->withHeader('Content-Type', 'application/javascript');
88 88
 
89
-		return $container->get( 'view' )->render( $response, 'Catalog/stock.html.twig', $contents );
89
+		return $container->get('view')->render($response, 'Catalog/stock.html.twig', $contents);
90 90
 	}
91 91
 
92 92
 
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
 	 * @param ResponseInterface $response Response object
99 99
 	 * @return ResponseInterface $response Modified response object with generated output
100 100
 	 */
101
-	public static function suggestAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
101
+	public static function suggestAction(ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args)
102 102
 	{
103
-		$contents = $container->get( 'aimeos_page' )->getSections( 'catalog-suggest', $request, $response, $args );
103
+		$contents = $container->get('aimeos_page')->getSections('catalog-suggest', $request, $response, $args);
104 104
 
105
-		$response = $response->withStatus( 200 );
106
-		$response = $response->withHeader( 'Content-Type', 'application/json' );
105
+		$response = $response->withStatus(200);
106
+		$response = $response->withHeader('Content-Type', 'application/json');
107 107
 
108
-		return $container->get( 'view' )->render( $response, 'Catalog/suggest.html.twig', $contents );
108
+		return $container->get('view')->render($response, 'Catalog/suggest.html.twig', $contents);
109 109
 	}
110 110
 }
111 111
\ No newline at end of file
Please login to merge, or discard this patch.