Completed
Push — master ( 26f065...cc0bbb )
by Aimeos
03:21
created
src/Aimeos/Shop/Base/View.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -32,55 +32,55 @@  discard block
 block discarded – undo
32 32
 	 * @param string|null $locale Code of the current language or null for no translation
33 33
 	 * @return \Aimeos\MW\View\Iface View object
34 34
 	 */
35
-	public function create( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $locale = null )
35
+	public function create(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $locale = null)
36 36
 	{
37 37
 		$params = $fixed = array();
38 38
 
39
-		if( $locale !== null )
39
+		if ($locale !== null)
40 40
 		{
41 41
 			$params = Route::current()->parameters() + Input::all();
42 42
 			$fixed = $this->getFixedParams();
43 43
 
44
-			$i18n = app('\Aimeos\Shop\Base\I18n')->get( array( $locale ) );
44
+			$i18n = app('\Aimeos\Shop\Base\I18n')->get(array($locale));
45 45
 			$translation = $i18n[$locale];
46 46
 		}
47 47
 		else
48 48
 		{
49
-			$translation = new \Aimeos\MW\Translation\None( 'en' );
49
+			$translation = new \Aimeos\MW\Translation\None('en');
50 50
 		}
51 51
 
52 52
 
53
-		$view = new \Aimeos\MW\View\Standard( $templatePaths );
53
+		$view = new \Aimeos\MW\View\Standard($templatePaths);
54 54
 
55
-		$helper = new \Aimeos\MW\View\Helper\Translate\Standard( $view, $translation );
56
-		$view->addHelper( 'translate', $helper );
55
+		$helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $translation);
56
+		$view->addHelper('translate', $helper);
57 57
 
58
-		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5( $view, app('url'), $fixed );
59
-		$view->addHelper( 'url', $helper );
58
+		$helper = new \Aimeos\MW\View\Helper\Url\Laravel5($view, app('url'), $fixed);
59
+		$view->addHelper('url', $helper);
60 60
 
61
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
62
-		$view->addHelper( 'param', $helper );
61
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($view, $params);
62
+		$view->addHelper('param', $helper);
63 63
 
64
-		$config = new \Aimeos\MW\Config\Decorator\Protect( clone $context->getConfig(), array( 'admin', 'client' ) );
65
-		$helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $config );
66
-		$view->addHelper( 'config', $helper );
64
+		$config = new \Aimeos\MW\Config\Decorator\Protect(clone $context->getConfig(), array('admin', 'client'));
65
+		$helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config);
66
+		$view->addHelper('config', $helper);
67 67
 
68
-		$sepDec = $config->get( 'client/html/common/format/seperatorDecimal', '.' );
69
-		$sep1000 = $config->get( 'client/html/common/format/seperator1000', ' ' );
70
-		$helper = new \Aimeos\MW\View\Helper\Number\Standard( $view, $sepDec, $sep1000 );
71
-		$view->addHelper( 'number', $helper );
68
+		$sepDec = $config->get('client/html/common/format/seperatorDecimal', '.');
69
+		$sep1000 = $config->get('client/html/common/format/seperator1000', ' ');
70
+		$helper = new \Aimeos\MW\View\Helper\Number\Standard($view, $sepDec, $sep1000);
71
+		$view->addHelper('number', $helper);
72 72
 
73
-		$helper = new \Aimeos\MW\View\Helper\Request\Laravel5( $view, Request::instance() );
74
-		$view->addHelper( 'request', $helper );
73
+		$helper = new \Aimeos\MW\View\Helper\Request\Laravel5($view, Request::instance());
74
+		$view->addHelper('request', $helper);
75 75
 
76
-		$helper = new \Aimeos\MW\View\Helper\Response\Laravel5( $view );
77
-		$view->addHelper( 'response', $helper );
76
+		$helper = new \Aimeos\MW\View\Helper\Response\Laravel5($view);
77
+		$view->addHelper('response', $helper);
78 78
 
79
-		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard( $view, '_token', csrf_token() );
80
-		$view->addHelper( 'csrf', $helper );
79
+		$helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_token', csrf_token());
80
+		$view->addHelper('csrf', $helper);
81 81
 
82
-		$helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, $this->getGroups( $context ) );
83
-		$view->addHelper( 'access', $helper );
82
+		$helper = new \Aimeos\MW\View\Helper\Access\Standard($view, $this->getGroups($context));
83
+		$view->addHelper('access', $helper);
84 84
 
85 85
 		return $view;
86 86
 	}
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
 	{
96 96
 		$fixed = array();
97 97
 
98
-		if( ( $value = Route::input( 'site' ) ) !== null ) {
98
+		if (($value = Route::input('site')) !== null) {
99 99
 			$fixed['site'] = $value;
100 100
 		}
101 101
 
102
-		if( ( $value = Route::input( 'locale' ) ) !== null ) {
102
+		if (($value = Route::input('locale')) !== null) {
103 103
 			$fixed['locale'] = $value;
104 104
 		}
105 105
 
106
-		if( ( $value = Route::input( 'currency' ) ) !== null ) {
106
+		if (($value = Route::input('currency')) !== null) {
107 107
 			$fixed['currency'] = $value;
108 108
 		}
109 109
 
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
118 118
 	 * @return \Closure Function which returns the user group codes
119 119
 	 */
120
-	protected function getGroups( \Aimeos\MShop\Context\Item\Iface $context )
120
+	protected function getGroups(\Aimeos\MShop\Context\Item\Iface $context)
121 121
 	{
122
-		return function() use ( $context )
122
+		return function() use ($context)
123 123
 		{
124 124
 			$list = array();
125
-			$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer/group' );
125
+			$manager = \Aimeos\MShop\Factory::createManager($context, 'customer/group');
126 126
 
127 127
 			$search = $manager->createSearch();
128
-			$search->setConditions( $search->compare( '==', 'customer.group.id', $context->getGroupIds() ) );
128
+			$search->setConditions($search->compare('==', 'customer.group.id', $context->getGroupIds()));
129 129
 
130
-			foreach( $manager->searchItems( $search ) as $item ) {
130
+			foreach ($manager->searchItems($search) as $item) {
131 131
 				$list[] = $item->getCode();
132 132
 			}
133 133
 
Please login to merge, or discard this patch.
src/Aimeos/Shop/Controller/JsonadmController.php 1 patch
Spacing   +52 added lines, -52 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,20 +168,20 @@  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 );
179
-		$context = $this->setLocale( $context, $site, $lang );
178
+		$context = app('\Aimeos\Shop\Base\Context')->get(false);
179
+		$context = $this->setLocale($context, $site, $lang);
180 180
 
181
-		$view = app( '\Aimeos\Shop\Base\View' )->create( $context, $templatePaths, $lang );
182
-		$context->setView( $view );
181
+		$view = app('\Aimeos\Shop\Base\View')->create($context, $templatePaths, $lang);
182
+		$context->setView($view);
183 183
 
184
-		return \Aimeos\Admin\JsonAdm\Factory::createClient( $context, $templatePaths, $resource );
184
+		return \Aimeos\Admin\JsonAdm\Factory::createClient($context, $templatePaths, $resource);
185 185
 	}
186 186
 
187 187
 
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
 	 * @param array $header List of HTTP headers
194 194
 	 * @return \Illuminate\Http\Response HTTP response object
195 195
 	 */
196
-	protected function createResponse( $content, $status, array $header )
196
+	protected function createResponse($content, $status, array $header)
197 197
 	{
198
-		$response = Response::make( $content, $status );
198
+		$response = Response::make($content, $status);
199 199
 
200
-		foreach( $header as $key => $value ) {
201
-			$response->header( $key, $value );
200
+		foreach ($header as $key => $value) {
201
+			$response->header($key, $value);
202 202
 		}
203 203
 
204 204
 		return $response;
@@ -213,23 +213,23 @@  discard block
 block discarded – undo
213 213
 	 * @param string $lang ISO language code, e.g. "en" or "en_GB"
214 214
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
215 215
 	 */
216
-	protected function setLocale( \Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang )
216
+	protected function setLocale(\Aimeos\MShop\Context\Item\Iface $context, $sitecode, $lang)
217 217
 	{
218
-		$localeManager = \Aimeos\MShop\Factory::createManager( $context, 'locale' );
218
+		$localeManager = \Aimeos\MShop\Factory::createManager($context, 'locale');
219 219
 
220 220
 		try
221 221
 		{
222
-			$localeItem = $localeManager->bootstrap( $sitecode, '', '', false );
223
-			$localeItem->setLanguageId( null );
224
-			$localeItem->setCurrencyId( null );
222
+			$localeItem = $localeManager->bootstrap($sitecode, '', '', false);
223
+			$localeItem->setLanguageId(null);
224
+			$localeItem->setCurrencyId(null);
225 225
 		}
226
-		catch( \Aimeos\MShop\Locale\Exception $e )
226
+		catch (\Aimeos\MShop\Locale\Exception $e)
227 227
 		{
228 228
 			$localeItem = $localeManager->createItem();
229 229
 		}
230 230
 
231
-		$context->setLocale( $localeItem );
232
-		$context->setI18n( app('\Aimeos\Shop\Base\I18n')->get( array( $lang ) ) );
231
+		$context->setLocale($localeItem);
232
+		$context->setI18n(app('\Aimeos\Shop\Base\I18n')->get(array($lang)));
233 233
 
234 234
 		return $context;
235 235
 	}
Please login to merge, or discard this patch.
src/Aimeos/Shop/Command/AccountCommand.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -43,29 +43,29 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function fire()
45 45
 	{
46
-		$code = $this->argument( 'email' );
47
-		if( ( $password = $this->option( 'password' ) ) === null ) {
48
-			$password = $this->secret( 'Password' );
46
+		$code = $this->argument('email');
47
+		if (($password = $this->option('password')) === null) {
48
+			$password = $this->secret('Password');
49 49
 		}
50 50
 
51
-		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false );
52
-		$context->setEditor( 'aimeos:account' );
51
+		$context = $this->getLaravel()->make('Aimeos\Shop\Base\Context')->get(false);
52
+		$context->setEditor('aimeos:account');
53 53
 
54
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
55
-		$context->setLocale( $localeManager->createItem() );
54
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
55
+		$context->setLocale($localeManager->createItem());
56 56
 
57
-		$user = $this->createCustomerItem( $context, $code, $password );
57
+		$user = $this->createCustomerItem($context, $code, $password);
58 58
 
59
-		if( $this->option( 'admin' ) ) {
60
-			$this->addGroup( $context, $user, 'admin' );
59
+		if ($this->option('admin')) {
60
+			$this->addGroup($context, $user, 'admin');
61 61
 		}
62 62
 
63
-		if( $this->option( 'api' ) ) {
64
-			$this->addGroup( $context, $user, 'api' );
63
+		if ($this->option('api')) {
64
+			$this->addGroup($context, $user, 'api');
65 65
 		}
66 66
 
67
-		if( $this->option( 'editor' ) ) {
68
-			$this->addGroup( $context, $user, 'editor' );
67
+		if ($this->option('editor')) {
68
+			$this->addGroup($context, $user, 'editor');
69 69
 		}
70 70
 	}
71 71
 
@@ -77,31 +77,31 @@  discard block
 block discarded – undo
77 77
 	 * @param string $userid Unique user ID
78 78
 	 * @param string $groupid Unique group ID
79 79
 	 */
80
-	protected function addListItem( \Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid )
80
+	protected function addListItem(\Aimeos\MShop\Context\Item\Iface $context, $userid, $groupid)
81 81
 	{
82
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context )->getSubmanager( 'lists' );
83
-		$typeid = $manager->getSubmanager( 'type' )->findItem( 'default', array(), 'customer/group' )->getId();
82
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context)->getSubmanager('lists');
83
+		$typeid = $manager->getSubmanager('type')->findItem('default', array(), 'customer/group')->getId();
84 84
 
85 85
 		$search = $manager->createSearch();
86 86
 		$expr = array(
87
-			$search->compare( '==', 'customer.lists.parentid', $userid ),
88
-			$search->compare( '==', 'customer.lists.refid', $groupid ),
89
-			$search->compare( '==', 'customer.lists.domain', 'customer/group' ),
90
-			$search->compare( '==', 'customer.lists.typeid', $typeid ),
87
+			$search->compare('==', 'customer.lists.parentid', $userid),
88
+			$search->compare('==', 'customer.lists.refid', $groupid),
89
+			$search->compare('==', 'customer.lists.domain', 'customer/group'),
90
+			$search->compare('==', 'customer.lists.typeid', $typeid),
91 91
 		);
92
-		$search->setConditions( $search->combine( '&&', $expr ) );
93
-		$search->setSlice( 0, 1 );
92
+		$search->setConditions($search->combine('&&', $expr));
93
+		$search->setSlice(0, 1);
94 94
 
95
-		if( count( $manager->searchItems( $search ) ) === 0 )
95
+		if (count($manager->searchItems($search)) === 0)
96 96
 		{
97 97
 			$item = $manager->createItem();
98
-			$item->setDomain( 'customer/group' );
99
-			$item->setParentId( $userid );
100
-			$item->setTypeId( $typeid );
101
-			$item->setRefId( $groupid );
102
-			$item->setStatus( 1 );
98
+			$item->setDomain('customer/group');
99
+			$item->setParentId($userid);
100
+			$item->setTypeId($typeid);
101
+			$item->setRefId($groupid);
102
+			$item->setStatus(1);
103 103
 
104
-			$manager->saveItem( $item, false );
104
+			$manager->saveItem($item, false);
105 105
 		}
106 106
 	}
107 107
 
@@ -113,23 +113,23 @@  discard block
 block discarded – undo
113 113
 	 * @param \Aimeos\MShop\Customer\Item\Iface $user Aimeos customer object
114 114
 	 * @param string $group Unique customer group code
115 115
 	 */
116
-	protected function addGroup( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Customer\Item\Iface $user, $group )
116
+	protected function addGroup(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Customer\Item\Iface $user, $group)
117 117
 	{
118
-		$this->info( sprintf( 'Add "%1$s" group to user "%2$s" for sites', $group, $user->getCode() ) );
118
+		$this->info(sprintf('Add "%1$s" group to user "%2$s" for sites', $group, $user->getCode()));
119 119
 
120
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context );
120
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context);
121 121
 
122
-		foreach( $this->getSiteItems( $context, $this->argument( 'site' ) ) as $siteItem )
122
+		foreach ($this->getSiteItems($context, $this->argument('site')) as $siteItem)
123 123
 		{
124
-			$localeItem = $localeManager->bootstrap( $siteItem->getCode(), '', '', false );
124
+			$localeItem = $localeManager->bootstrap($siteItem->getCode(), '', '', false);
125 125
 
126 126
 			$lcontext = clone $context;
127
-			$lcontext->setLocale( $localeItem );
127
+			$lcontext->setLocale($localeItem);
128 128
 
129
-			$this->info( '- ' . $siteItem->getCode() );
129
+			$this->info('- '.$siteItem->getCode());
130 130
 
131
-			$groupItem = $this->getGroupItem( $lcontext, $group );
132
-			$this->addListItem( $lcontext, $user->getId(), $groupItem->getId() );
131
+			$groupItem = $this->getGroupItem($lcontext, $group);
132
+			$this->addListItem($lcontext, $user->getId(), $groupItem->getId());
133 133
 		}
134 134
 	}
135 135
 
@@ -144,22 +144,22 @@  discard block
 block discarded – undo
144 144
 	 * @param string $password New user password
145 145
 	 * @return \Aimeos\MShop\Customer\Item\Iface Aimeos customer item object
146 146
 	 */
147
-	protected function createCustomerItem( \Aimeos\MShop\Context\Item\Iface $context, $email, $password )
147
+	protected function createCustomerItem(\Aimeos\MShop\Context\Item\Iface $context, $email, $password)
148 148
 	{
149
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'customer' );
149
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'customer');
150 150
 
151 151
 		try {
152
-			$item = $manager->findItem( $email );
153
-		} catch( \Aimeos\MShop\Exception $e ) {
152
+			$item = $manager->findItem($email);
153
+		} catch (\Aimeos\MShop\Exception $e) {
154 154
 			$item = $manager->createItem();
155 155
 		}
156 156
 
157
-		$item->setCode( $email );
158
-		$item->setLabel( $email );
159
-		$item->getPaymentAddress()->setEmail( $email );
160
-		$item->setPassword( $password );
157
+		$item->setCode($email);
158
+		$item->setLabel($email);
159
+		$item->getPaymentAddress()->setEmail($email);
160
+		$item->setPassword($password);
161 161
 
162
-		$manager->saveItem( $item );
162
+		$manager->saveItem($item);
163 163
 
164 164
 		return $item;
165 165
 	}
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	protected function getArguments()
174 174
 	{
175 175
 		return array(
176
-			array( 'email', InputArgument::REQUIRED, 'E-mail address of the account that should be created' ),
177
-			array( 'site', InputArgument::OPTIONAL, 'Site codes to create accounts for like "default unittest" (none for all)' ),
176
+			array('email', InputArgument::REQUIRED, 'E-mail address of the account that should be created'),
177
+			array('site', InputArgument::OPTIONAL, 'Site codes to create accounts for like "default unittest" (none for all)'),
178 178
 		);
179 179
 	}
180 180
 
@@ -186,21 +186,21 @@  discard block
 block discarded – undo
186 186
 	 * @param string $code Unique customer group code
187 187
 	 * @return \Aimeos\MShop\Customer\Item\Group\Iface Aimeos customer group item object
188 188
 	 */
189
-	protected function getGroupItem( \Aimeos\MShop\Context\Item\Iface $context, $code )
189
+	protected function getGroupItem(\Aimeos\MShop\Context\Item\Iface $context, $code)
190 190
 	{
191
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context )->getSubmanager( 'group' );
191
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context)->getSubmanager('group');
192 192
 
193 193
 		try
194 194
 		{
195
-			$item = $manager->findItem( $code );
195
+			$item = $manager->findItem($code);
196 196
 		}
197
-		catch( \Aimeos\MShop\Exception $e )
197
+		catch (\Aimeos\MShop\Exception $e)
198 198
 		{
199 199
 			$item = $manager->createItem();
200
-			$item->setLabel( $code );
201
-			$item->setCode( $code );
200
+			$item->setLabel($code);
201
+			$item->setCode($code);
202 202
 
203
-			$manager->saveItem( $item );
203
+			$manager->saveItem($item);
204 204
 		}
205 205
 
206 206
 		return $item;
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
 	protected function getOptions()
216 216
 	{
217 217
 		return array(
218
-			array( 'password', null, InputOption::VALUE_REQUIRED, 'Optional password for the account (will ask for if not given)' ),
219
-			array( 'admin', null, InputOption::VALUE_NONE, 'If account should have administrator privileges' ),
220
-			array( 'api', null, InputOption::VALUE_NONE, 'If account should be able to access the APIs' ),
221
-			array( 'editor', null, InputOption::VALUE_NONE, 'If account should have limited editor privileges' ),
218
+			array('password', null, InputOption::VALUE_REQUIRED, 'Optional password for the account (will ask for if not given)'),
219
+			array('admin', null, InputOption::VALUE_NONE, 'If account should have administrator privileges'),
220
+			array('api', null, InputOption::VALUE_NONE, 'If account should be able to access the APIs'),
221
+			array('editor', null, InputOption::VALUE_NONE, 'If account should have limited editor privileges'),
222 222
 		);
223 223
 	}
224 224
 }
Please login to merge, or discard this patch.