Completed
Push — master ( 20a540...790484 )
by Aimeos
04:14
created
src/Aimeos/Shop/Base/Support.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param \Aimeos\Shop\Base\Context $context Context provider
40 40
 	 * @param \Aimeos\Shop\Base\Locale $locale Locale provider
41 41
 	 */
42
-	public function __construct( \Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\Locale $locale )
42
+	public function __construct(\Aimeos\Shop\Base\Context $context, \Aimeos\Shop\Base\Locale $locale)
43 43
 	{
44 44
 		$this->context = $context;
45 45
 		$this->locale = $locale;
@@ -53,45 +53,45 @@  discard block
 block discarded – undo
53 53
 	 * @param string|array $groupcodes Unique user/customer group codes that are allowed
54 54
 	 * @return boolean True if user is part of the group, false if not
55 55
 	 */
56
-	public function checkGroup( $userid, $groupcodes )
56
+	public function checkGroup($userid, $groupcodes)
57 57
 	{
58
-		$site = ( Route::current() ? Route::input( 'site', Input::get( 'site', 'default' ) ) : 'default' );
58
+		$site = (Route::current() ? Route::input('site', Input::get('site', 'default')) : 'default');
59 59
 
60
-		$context = $this->context->get( false );
61
-		$context->setLocale( $this->locale->getBackend( $context, $site ) );
60
+		$context = $this->context->get(false);
61
+		$context->setLocale($this->locale->getBackend($context, $site));
62 62
 
63 63
 
64
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/group' );
64
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/group');
65 65
 
66 66
 		$search = $manager->createSearch();
67
-		$search->setConditions( $search->compare( '==', 'customer.group.code', (array) $groupcodes ) );
68
-		$groupItems = $manager->searchItems( $search );
67
+		$search->setConditions($search->compare('==', 'customer.group.code', (array) $groupcodes));
68
+		$groupItems = $manager->searchItems($search);
69 69
 
70 70
 
71
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/lists' );
71
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/lists');
72 72
 
73 73
 		$search = $manager->createSearch();
74 74
 		$expr = array(
75
-			$search->compare( '==', 'customer.lists.parentid', $userid ),
76
-			$search->compare( '==', 'customer.lists.refid', array_keys( $groupItems ) ),
77
-			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
75
+			$search->compare('==', 'customer.lists.parentid', $userid),
76
+			$search->compare('==', 'customer.lists.refid', array_keys($groupItems)),
77
+			$search->compare('==', 'customer.lists.domain', 'customer/group'),
78 78
 		);
79
-		$search->setConditions( $search->combine( '&&', $expr ) );
80
-		$search->setSlice( 0, 1 );
79
+		$search->setConditions($search->combine('&&', $expr));
80
+		$search->setSlice(0, 1);
81 81
 
82
-		return (bool) count( $manager->searchItems( $search ) );
82
+		return (bool) count($manager->searchItems($search));
83 83
 	}
84 84
 
85 85
 
86
-	public function getGroups( \Aimeos\MShop\Context\Item\Iface $context )
86
+	public function getGroups(\Aimeos\MShop\Context\Item\Iface $context)
87 87
 	{
88 88
 		$list = array();
89
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/group' );
89
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/group');
90 90
 
91 91
 		$search = $manager->createSearch();
92
-		$search->setConditions( $search->compare( '==', 'customer.group.id', $context->getGroupIds() ) );
92
+		$search->setConditions($search->compare('==', 'customer.group.id', $context->getGroupIds()));
93 93
 
94
-		foreach( $manager->searchItems( $search ) as $item ) {
94
+		foreach ($manager->searchItems($search) as $item) {
95 95
 			$list[] = $item->getCode();
96 96
 		}
97 97
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/JsonadmController.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
 	 * @param \Illuminate\Http\Request $request Request object
36 36
 	 * @return \Illuminate\Http\Response Response object containing the generated output
37 37
 	 */
38
-	public function deleteAction( Request $request )
38
+	public function deleteAction(Request $request)
39 39
 	{
40
-		if( config( 'shop.authorize', true ) ) {
41
-			$this->authorize( 'admin', [['admin', 'api']] );
40
+		if (config('shop.authorize', true)) {
41
+			$this->authorize('admin', [['admin', 'api']]);
42 42
 		}
43 43
 
44 44
 		$status = 500;
45 45
 		$header = $request->headers->all();
46 46
 
47 47
 		$client = $this->createClient();
48
-		$result = $client->delete( (string) $request->getContent(), $header, $status );
48
+		$result = $client->delete((string) $request->getContent(), $header, $status);
49 49
 
50
-		return $this->createResponse( $result, $status, $header );
50
+		return $this->createResponse($result, $status, $header);
51 51
 	}
52 52
 
53 53
 
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 	 * @param \Illuminate\Http\Request $request Request object
58 58
 	 * @return \Illuminate\Http\Response Response object containing the generated output
59 59
 	 */
60
-	public function getAction( Request $request )
60
+	public function getAction(Request $request)
61 61
 	{
62
-		if( config( 'shop.authorize', true ) ) {
63
-			$this->authorize( 'admin', [['admin', 'api', 'editor']] );
62
+		if (config('shop.authorize', true)) {
63
+			$this->authorize('admin', [['admin', 'api', 'editor']]);
64 64
 		}
65 65
 
66 66
 		$status = 500;
67 67
 		$header = $request->headers->all();
68 68
 
69 69
 		$client = $this->createClient();
70
-		$result = $client->get( (string) $request->getContent(), $header, $status );
70
+		$result = $client->get((string) $request->getContent(), $header, $status);
71 71
 
72
-		return $this->createResponse( $result, $status, $header );
72
+		return $this->createResponse($result, $status, $header);
73 73
 	}
74 74
 
75 75
 
@@ -79,19 +79,19 @@  discard block
 block discarded – undo
79 79
 	 * @param \Illuminate\Http\Request $request Request object
80 80
 	 * @return \Illuminate\Http\Response Response object containing the generated output
81 81
 	 */
82
-	public function patchAction( Request $request )
82
+	public function patchAction(Request $request)
83 83
 	{
84
-		if( config( 'shop.authorize', true ) ) {
85
-			$this->authorize( 'admin', [['admin', 'api']] );
84
+		if (config('shop.authorize', true)) {
85
+			$this->authorize('admin', [['admin', 'api']]);
86 86
 		}
87 87
 
88 88
 		$status = 500;
89 89
 		$header = $request->headers->all();
90 90
 
91 91
 		$client = $this->createClient();
92
-		$result = $client->patch( (string) $request->getContent(), $header, $status );
92
+		$result = $client->patch((string) $request->getContent(), $header, $status);
93 93
 
94
-		return $this->createResponse( $result, $status, $header );
94
+		return $this->createResponse($result, $status, $header);
95 95
 	}
96 96
 
97 97
 
@@ -101,19 +101,19 @@  discard block
 block discarded – undo
101 101
 	 * @param \Illuminate\Http\Request $request Request object
102 102
 	 * @return \Illuminate\Http\Response Response object containing the generated output
103 103
 	 */
104
-	public function postAction( Request $request )
104
+	public function postAction(Request $request)
105 105
 	{
106
-		if( config( 'shop.authorize', true ) ) {
107
-			$this->authorize( 'admin', [['admin', 'api']] );
106
+		if (config('shop.authorize', true)) {
107
+			$this->authorize('admin', [['admin', 'api']]);
108 108
 		}
109 109
 
110 110
 		$status = 500;
111 111
 		$header = $request->headers->all();
112 112
 
113 113
 		$client = $this->createClient();
114
-		$result = $client->post( (string) $request->getContent(), $header, $status );
114
+		$result = $client->post((string) $request->getContent(), $header, $status);
115 115
 
116
-		return $this->createResponse( $result, $status, $header );
116
+		return $this->createResponse($result, $status, $header);
117 117
 	}
118 118
 
119 119
 
@@ -123,19 +123,19 @@  discard block
 block discarded – undo
123 123
 	 * @param \Illuminate\Http\Request $request Request object
124 124
 	 * @return \Illuminate\Http\Response Response object containing the generated output
125 125
 	 */
126
-	public function putAction( Request $request )
126
+	public function putAction(Request $request)
127 127
 	{
128
-		if( config( 'shop.authorize', true ) ) {
129
-			$this->authorize( 'admin', [['admin', 'api']] );
128
+		if (config('shop.authorize', true)) {
129
+			$this->authorize('admin', [['admin', 'api']]);
130 130
 		}
131 131
 
132 132
 		$status = 500;
133 133
 		$header = $request->headers->all();
134 134
 
135 135
 		$client = $this->createClient();
136
-		$result = $client->put( (string) $request->getContent(), $header, $status );
136
+		$result = $client->put((string) $request->getContent(), $header, $status);
137 137
 
138
-		return $this->createResponse( $result, $status, $header );
138
+		return $this->createResponse($result, $status, $header);
139 139
 	}
140 140
 
141 141
 
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
 	 * @param \Illuminate\Http\Request $request Request object
146 146
 	 * @return \Illuminate\Http\Response Response object containing the generated output
147 147
 	 */
148
-	public function optionsAction( Request $request )
148
+	public function optionsAction(Request $request)
149 149
 	{
150
-		if( config( 'shop.authorize', true ) ) {
151
-			$this->authorize( 'admin', [['admin', 'api', 'editor']] );
150
+		if (config('shop.authorize', true)) {
151
+			$this->authorize('admin', [['admin', 'api', 'editor']]);
152 152
 		}
153 153
 
154 154
 		$status = 500;
155 155
 		$header = $request->headers->all();
156 156
 
157 157
 		$client = $this->createClient();
158
-		$result = $client->options( (string) $request->getContent(), $header, $status );
158
+		$result = $client->options((string) $request->getContent(), $header, $status);
159 159
 
160
-		return $this->createResponse( $result, $status, $header );
160
+		return $this->createResponse($result, $status, $header);
161 161
 	}
162 162
 
163 163
 
@@ -168,19 +168,19 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	protected function createClient()
170 170
 	{
171
-		$site = Route::input( 'site', Input::get( 'site', 'default' ) );
172
-		$lang = Input::get( 'lang', config( 'app.locale', 'en' ) );
173
-		$resource = Route::input( 'resource' );
171
+		$site = Route::input('site', Input::get('site', 'default'));
172
+		$lang = Input::get('lang', config('app.locale', 'en'));
173
+		$resource = Route::input('resource');
174 174
 
175
-		$aimeos = app( '\Aimeos\Shop\Base\Aimeos' )->get();
176
-		$templatePaths = $aimeos->getCustomPaths( 'admin/jsonadm/templates' );
175
+		$aimeos = app('\Aimeos\Shop\Base\Aimeos')->get();
176
+		$templatePaths = $aimeos->getCustomPaths('admin/jsonadm/templates');
177 177
 
178
-		$context = app( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' );
179
-		$context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang, 'en' ) ) );
180
-		$context->setLocale( app('\Aimeos\Shop\Base\Locale')->getBackend( $context, $site ) );
181
-		$context->setView( app( '\Aimeos\Shop\Base\View' )->create( $context, $templatePaths, $lang ) );
178
+		$context = app('\Aimeos\Shop\Base\Context')->get(false, 'backend');
179
+		$context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang, 'en')));
180
+		$context->setLocale(app('\Aimeos\Shop\Base\Locale')->getBackend($context, $site));
181
+		$context->setView(app('\Aimeos\Shop\Base\View')->create($context, $templatePaths, $lang));
182 182
 
183
-		return \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, $resource );
183
+		return \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, $resource);
184 184
 	}
185 185
 
186 186
 
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
 	 * @param array $header List of HTTP headers
193 193
 	 * @return \Illuminate\Http\Response HTTP response object
194 194
 	 */
195
-	protected function createResponse( $content, $status, array $header )
195
+	protected function createResponse($content, $status, array $header)
196 196
 	{
197
-		$response = Response::make( $content, $status );
197
+		$response = Response::make($content, $status);
198 198
 
199
-		foreach( $header as $key => $value ) {
200
-			$response->header( $key, $value );
199
+		foreach ($header as $key => $value) {
200
+			$response->header($key, $value);
201 201
 		}
202 202
 
203 203
 		return $response;
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/CacheCommand.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function fire()
44 44
 	{
45
-		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false, 'command' );
46
-		$context->setEditor( 'aimeos:cache' );
45
+		$context = $this->getLaravel()->make('Aimeos\Shop\Base\Context')->get(false, 'command');
46
+		$context->setEditor('aimeos:cache');
47 47
 
48
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
48
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
49 49
 
50
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
50
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
51 51
 		{
52
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
52
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
53 53
 
54 54
 			$lcontext = clone $context;
55
-			$lcontext->setLocale( $localeItem );
55
+			$lcontext->setLocale($localeItem);
56 56
 
57
-			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $lcontext );
58
-			$lcontext->setCache( $cache );
57
+			$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard($lcontext);
58
+			$lcontext->setCache($cache);
59 59
 
60
-			$this->info( sprintf( 'Clearing the Aimeos cache for site "%1$s"', $siteItem->getCode() ) );
60
+			$this->info(sprintf('Clearing the Aimeos cache for site "%1$s"', $siteItem->getCode()));
61 61
 
62
-			\Aimeos\MAdmin\Cache\Manager\Factory::createManager( $lcontext )->getCache()->flush();
62
+			\Aimeos\MAdmin\Cache\Manager\Factory::createManager($lcontext)->getCache()->flush();
63 63
 		}
64 64
 	}
65 65
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	protected function getArguments()
73 73
 	{
74 74
 		return array(
75
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)' ),
75
+			array('site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)'),
76 76
 		);
77 77
 	}
78 78
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/SetupCommand.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -42,18 +42,18 @@  discard block
 block discarded – undo
42 42
 	 * @param string $classname Name of the setup task class
43 43
 	 * @return boolean True if class is found, false if not
44 44
 	 */
45
-	public static function autoload( $classname )
45
+	public static function autoload($classname)
46 46
 	{
47
-		if( strncmp( $classname, 'Aimeos\\MW\\Setup\\Task\\', 21 ) === 0 )
47
+		if (strncmp($classname, 'Aimeos\\MW\\Setup\\Task\\', 21) === 0)
48 48
 		{
49
-			$fileName = substr( $classname, 21 ) . '.php';
50
-			$paths = explode( PATH_SEPARATOR, get_include_path() );
49
+			$fileName = substr($classname, 21).'.php';
50
+			$paths = explode(PATH_SEPARATOR, get_include_path());
51 51
 
52
-			foreach( $paths as $path )
52
+			foreach ($paths as $path)
53 53
 			{
54
-				$file = $path . DIRECTORY_SEPARATOR . $fileName;
54
+				$file = $path.DIRECTORY_SEPARATOR.$fileName;
55 55
 
56
-				if( file_exists( $file ) === true && ( include_once $file ) !== false ) {
56
+				if (file_exists($file) === true && (include_once $file) !== false) {
57 57
 					return true;
58 58
 				}
59 59
 			}
@@ -70,49 +70,49 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function fire()
72 72
 	{
73
-		$ctx = $this->getLaravel()->make( '\Aimeos\Shop\Base\Context' )->get( false, 'command' );
74
-		$ctx->setEditor( 'aimeos:setup' );
73
+		$ctx = $this->getLaravel()->make('\Aimeos\Shop\Base\Context')->get(false, 'command');
74
+		$ctx->setEditor('aimeos:setup');
75 75
 
76 76
 		$config = $ctx->getConfig();
77
-		$site = $this->argument( 'site' );
78
-		$template = $this->argument( 'tplsite' );
77
+		$site = $this->argument('site');
78
+		$template = $this->argument('tplsite');
79 79
 
80
-		$config->set( 'setup/site', $site );
81
-		$dbconfig = $this->getDbConfig( $config );
82
-		$this->setOptions( $config );
80
+		$config->set('setup/site', $site);
81
+		$dbconfig = $this->getDbConfig($config);
82
+		$this->setOptions($config);
83 83
 
84
-		$taskPaths = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get()->getSetupPaths( $template );
84
+		$taskPaths = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get()->getSetupPaths($template);
85 85
 
86 86
 		$includePaths = $taskPaths;
87 87
 		$includePaths[] = get_include_path();
88 88
 
89
-		if( set_include_path( implode( PATH_SEPARATOR, $includePaths ) ) === false ) {
90
-			throw new \Exception( 'Unable to extend include path' );
89
+		if (set_include_path(implode(PATH_SEPARATOR, $includePaths)) === false) {
90
+			throw new \Exception('Unable to extend include path');
91 91
 		}
92 92
 
93
-		spl_autoload_register( '\Aimeos\Shop\Command\SetupCommand::autoload', true );
93
+		spl_autoload_register('\Aimeos\Shop\Command\SetupCommand::autoload', true);
94 94
 
95
-		$manager = new \Aimeos\MW\Setup\Manager\Multiple( $ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx );
95
+		$manager = new \Aimeos\MW\Setup\Manager\Multiple($ctx->getDatabaseManager(), $dbconfig, $taskPaths, $ctx);
96 96
 
97
-		$this->info( sprintf( 'Initializing or updating the Aimeos database tables for site "%1$s"', $site ) );
97
+		$this->info(sprintf('Initializing or updating the Aimeos database tables for site "%1$s"', $site));
98 98
 
99
-		if( ( $task = $this->option( 'task' ) ) && is_array( $task ) ) {
100
-			$task = reset( $task );
99
+		if (($task = $this->option('task')) && is_array($task)) {
100
+			$task = reset($task);
101 101
 		}
102 102
 
103
-		switch( $this->option( 'action' ) )
103
+		switch ($this->option('action'))
104 104
 		{
105 105
 			case 'migrate':
106
-				$manager->migrate( $task );
106
+				$manager->migrate($task);
107 107
 				break;
108 108
 			case 'rollback':
109
-				$manager->rollback( $task );
109
+				$manager->rollback($task);
110 110
 				break;
111 111
 			case 'clean':
112
-				$manager->clean( $task );
112
+				$manager->clean($task);
113 113
 				break;
114 114
 			default:
115
-				throw new \Exception( sprintf( 'Invalid setup action "%1$s"', $this->option( 'action' ) ) );
115
+				throw new \Exception(sprintf('Invalid setup action "%1$s"', $this->option('action')));
116 116
 		}
117 117
 	}
118 118
 
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 	protected function getArguments()
126 126
 	{
127 127
 		return array(
128
-			array( 'site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default' ),
129
-			array( 'tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default' ),
128
+			array('site', InputArgument::OPTIONAL, 'Site for updating database entries', 'default'),
129
+			array('tplsite', InputArgument::OPTIONAL, 'Site used as template for creating the new one', 'default'),
130 130
 		);
131 131
 	}
132 132
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 	protected function getOptions()
140 140
 	{
141 141
 		return array(
142
-			array( 'option', null, InputOption::VALUE_REQUIRED, 'Setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array() ),
143
-			array( 'action', null, InputOption::VALUE_REQUIRED, 'Action name that should be executed, i.e. "migrate", "rollback", "clean"', 'migrate' ),
144
-			array( 'task', null, InputOption::VALUE_REQUIRED, 'Name of the setup task that should be executed', null ),
142
+			array('option', null, InputOption::VALUE_REQUIRED, 'Setup configuration, name and value are separated by ":" like "setup/default/demo:1"', array()),
143
+			array('action', null, InputOption::VALUE_REQUIRED, 'Action name that should be executed, i.e. "migrate", "rollback", "clean"', 'migrate'),
144
+			array('task', null, InputOption::VALUE_REQUIRED, 'Name of the setup task that should be executed', null),
145 145
 		);
146 146
 	}
147 147
 
@@ -152,14 +152,14 @@  discard block
 block discarded – undo
152 152
 	 * @param \Aimeos\MW\Config\Iface $conf Config object
153 153
 	 * @return array Multi-dimensional associative list of database configuration parameters
154 154
 	 */
155
-	protected function getDbConfig( \Aimeos\MW\Config\Iface $conf )
155
+	protected function getDbConfig(\Aimeos\MW\Config\Iface $conf)
156 156
 	{
157
-		$dbconfig = $conf->get( 'resource', array() );
157
+		$dbconfig = $conf->get('resource', array());
158 158
 
159
-		foreach( $dbconfig as $rname => $dbconf )
159
+		foreach ($dbconfig as $rname => $dbconf)
160 160
 		{
161
-			if( strncmp( $rname, 'db', 2 ) !== 0 ) {
162
-				unset( $dbconfig[$rname] );
161
+			if (strncmp($rname, 'db', 2) !== 0) {
162
+				unset($dbconfig[$rname]);
163 163
 			}
164 164
 		}
165 165
 
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
 	 * @param array Associative list of database configurations
175 175
 	 * @throws \RuntimeException If the format of the options is invalid
176 176
 	 */
177
-	protected function setOptions( \Aimeos\MW\Config\Iface $conf )
177
+	protected function setOptions(\Aimeos\MW\Config\Iface $conf)
178 178
 	{
179
-		foreach( (array) $this->option( 'option' ) as $option )
179
+		foreach ((array) $this->option('option') as $option)
180 180
 		{
181
-			list( $name, $value ) = explode( ':', $option );
182
-			$conf->set( str_replace( '\\', '/', $name ), $value );
181
+			list($name, $value) = explode(':', $option);
182
+			$conf->set(str_replace('\\', '/', $name), $value);
183 183
 		}
184 184
 	}
185 185
 }
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/JobsCommand.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -43,24 +43,24 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function fire()
45 45
 	{
46
-		$aimeos = $this->getLaravel()->make( '\Aimeos\Shop\Base\Aimeos' )->get();
46
+		$aimeos = $this->getLaravel()->make('\Aimeos\Shop\Base\Aimeos')->get();
47 47
 		$context = $this->getContext();
48 48
 
49
-		$jobs = explode( ' ', $this->argument( 'jobs' ) );
50
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
49
+		$jobs = explode(' ', $this->argument('jobs'));
50
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
51 51
 
52
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
52
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
53 53
 		{
54
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
55
-			$localeItem->setLanguageId( null );
56
-			$localeItem->setCurrencyId( null );
54
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
55
+			$localeItem->setLanguageId(null);
56
+			$localeItem->setCurrencyId(null);
57 57
 
58
-			$context->setLocale( $localeItem );
58
+			$context->setLocale($localeItem);
59 59
 
60
-			$this->info( sprintf( 'Executing the Aimeos jobs for "%s"', $siteItem->getCode() ) );
60
+			$this->info(sprintf('Executing the Aimeos jobs for "%s"', $siteItem->getCode()));
61 61
 
62
-			foreach( $jobs as $jobname ) {
63
-				\Aimeos\Controller\Jobs\Factory::createController( $context, $aimeos, $jobname )->run();
62
+			foreach ($jobs as $jobname) {
63
+				\Aimeos\Controller\Jobs\Factory::createController($context, $aimeos, $jobname)->run();
64 64
 			}
65 65
 		}
66 66
 	}
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 	protected function getArguments()
75 75
 	{
76 76
 		return array(
77
-			array( 'jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"' ),
78
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)' ),
77
+			array('jobs', InputArgument::REQUIRED, 'One or more job controller names like "admin/job customer/email/watch"'),
78
+			array('site', InputArgument::OPTIONAL, 'Site codes to execute the jobs for like "default unittest" (none for all)'),
79 79
 		);
80 80
 	}
81 81
 
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
 	protected function getContext()
99 99
 	{
100 100
 		$lv = $this->getLaravel();
101
-		$aimeos = $lv->make( '\Aimeos\Shop\Base\Aimeos' )->get();
102
-		$context = $lv->make( '\Aimeos\Shop\Base\Context' )->get( false, 'command' );
101
+		$aimeos = $lv->make('\Aimeos\Shop\Base\Aimeos')->get();
102
+		$context = $lv->make('\Aimeos\Shop\Base\Context')->get(false, 'command');
103 103
 
104
-		$tmplPaths = $aimeos->getCustomPaths( 'controller/jobs/templates' );
105
-		$view = $lv->make( '\Aimeos\Shop\Base\View' )->create( $context, $tmplPaths );
104
+		$tmplPaths = $aimeos->getCustomPaths('controller/jobs/templates');
105
+		$view = $lv->make('\Aimeos\Shop\Base\View')->create($context, $tmplPaths);
106 106
 
107
-		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'language' );
108
-		$langids = array_keys( $langManager->searchItems( $langManager->createSearch( true ) ) );
109
-		$i18n = $lv->make( '\Aimeos\Shop\Base\I18n' )->get( $langids );
107
+		$langManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('language');
108
+		$langids = array_keys($langManager->searchItems($langManager->createSearch(true)));
109
+		$i18n = $lv->make('\Aimeos\Shop\Base\I18n')->get($langids);
110 110
 
111
-		$context->setEditor( 'aimeos:jobs' );
112
-		$context->setView( $view );
113
-		$context->setI18n( $i18n );
111
+		$context->setEditor('aimeos:jobs');
112
+		$context->setView($view);
113
+		$context->setI18n($i18n);
114 114
 
115 115
 		return $context;
116 116
 	}
Please login to merge, or discard this patch.