Completed
Push — master ( 921503...9109fd )
by Aimeos
02:03
created
controller/frontend/src/Controller/Frontend/Service/Iface.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @param string[] $attributes List of attribute codes as keys and strings entered by the customer as value
31 31
 	 * @return string[] List of attributes codes as keys and error messages as values for invalid or missing values
32 32
 	 */
33
-	public function checkAttributes( $serviceId, array $attributes );
33
+	public function checkAttributes($serviceId, array $attributes);
34 34
 
35 35
 	/**
36 36
 	 * Returns the service item for the given ID
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
40 40
 	 * @return \Aimeos\MShop\Service\Provider\Iface Service provider object
41 41
 	 */
42
-	public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] );
42
+	public function getProvider($serviceId, $ref = ['media', 'price', 'text']);
43 43
 
44 44
 	/**
45 45
 	 * Returns the service providers for the given type
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
49 49
 	 * @return \Aimeos\MShop\Service\Provider\Iface[] List of service IDs as keys and service provider objects as values
50 50
 	 */
51
-	public function getProviders( $type = null, $ref = ['media', 'price', 'text'] );
51
+	public function getProviders($type = null, $ref = ['media', 'price', 'text']);
52 52
 
53 53
 	/**
54 54
 	 * Processes the service for the given order, e.g. payment and delivery services
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Iface|null Form object with URL, parameters, etc.
62 62
 	 * 	or null if no form data is required
63 63
 	 */
64
-	public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params );
64
+	public function process(\Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params);
65 65
 
66 66
 
67 67
 	/**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @param string $code Unique code of the service used for the current order
73 73
 	 * @return \Psr\Http\Message\ResponseInterface Response object
74 74
 	 */
75
-	public function updatePush( ServerRequestInterface $request, ResponseInterface $response, $code );
75
+	public function updatePush(ServerRequestInterface $request, ResponseInterface $response, $code);
76 76
 
77 77
 
78 78
 	/**
@@ -83,5 +83,5 @@  discard block
 block discarded – undo
83 83
 	 * @param string $orderid ID of the order whose payment status should be updated
84 84
 	 * @return \Aimeos\MShop\Order\Item\Iface $orderItem Order item that has been updated
85 85
 	 */
86
-	public function updateSync( ServerRequestInterface $request, $code, $orderid );
86
+	public function updateSync(ServerRequestInterface $request, $code, $orderid);
87 87
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Iface.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @param string $type Arbitrary order type (max. eight chars)
28 28
 	 * @return \Aimeos\MShop\Order\Item\Iface Created order object
29 29
 	 */
30
-	public function addItem( $baseId, $type );
30
+	public function addItem($baseId, $type);
31 31
 
32 32
 
33 33
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @param boolean $default Use default criteria to limit orders
46 46
 	 * @return \Aimeos\MShop\Order\Item\Iface Order object
47 47
 	 */
48
-	public function getItem( $id, $default = true );
48
+	public function getItem($id, $default = true);
49 49
 
50 50
 
51 51
 	/**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @param \Aimeos\MShop\Order\Item\Iface $item Order object
55 55
 	 * @return \Aimeos\MShop\Order\Item\Iface Saved order item
56 56
 	 */
57
-	public function saveItem( \Aimeos\MShop\Order\Item\Iface $item );
57
+	public function saveItem(\Aimeos\MShop\Order\Item\Iface $item);
58 58
 
59 59
 
60 60
 	/**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @param integer &$total|null Variable that will contain the total number of available items
65 65
 	 * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values
66 66
 	 */
67
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
67
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
68 68
 
69 69
 
70 70
 	/**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
87 87
 	 * @return void
88 88
 	 */
89
-	public function block( \Aimeos\MShop\Order\Item\Iface $orderItem );
89
+	public function block(\Aimeos\MShop\Order\Item\Iface $orderItem);
90 90
 
91 91
 
92 92
 	/**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
109 109
 	 * @return void
110 110
 	 */
111
-	public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem );
111
+	public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem);
112 112
 
113 113
 
114 114
 	/**
@@ -126,5 +126,5 @@  discard block
 block discarded – undo
126 126
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
127 127
 	 * @return void
128 128
 	 */
129
-	public function update( \Aimeos\MShop\Order\Item\Iface $orderItem );
129
+	public function update(\Aimeos\MShop\Order\Item\Iface $orderItem);
130 130
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Standard.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
 		try
48 48
 		{
49 49
 			$item = $manager->findItem( $list['customer.code'], [], true );
50
-		}
51
-		catch( \Aimeos\MShop\Exception $e )
50
+		} catch( \Aimeos\MShop\Exception $e )
52 51
 		{
53 52
 			$this->checkLimit( $list );
54 53
 
Please login to merge, or discard this patch.
Spacing   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -28,29 +28,29 @@  discard block
 block discarded – undo
28 28
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
29 29
 	 * @since 2017.04
30 30
 	 */
31
-	public function addItem( array $values )
31
+	public function addItem(array $values)
32 32
 	{
33 33
 		$list = [];
34 34
 		$context = $this->getContext();
35 35
 		$config = $context->getConfig();
36 36
 
37
-		foreach( $values as $key => $val ) {
38
-			$list[str_replace( 'order.base.address', 'customer', $key )] = $val;
37
+		foreach ($values as $key => $val) {
38
+			$list[str_replace('order.base.address', 'customer', $key)] = $val;
39 39
 		}
40 40
 
41
-		$manager = \Aimeos\MShop::create( $context, 'customer' );
42
-		$list = $this->addItemDefaults( $list );
41
+		$manager = \Aimeos\MShop::create($context, 'customer');
42
+		$list = $this->addItemDefaults($list);
43 43
 		$passwd = $list['customer.password'];
44 44
 
45 45
 		try
46 46
 		{
47
-			$item = $manager->findItem( $list['customer.code'], [], true );
47
+			$item = $manager->findItem($list['customer.code'], [], true);
48 48
 		}
49
-		catch( \Aimeos\MShop\Exception $e )
49
+		catch (\Aimeos\MShop\Exception $e)
50 50
 		{
51
-			$this->checkLimit( $list );
51
+			$this->checkLimit($list);
52 52
 
53
-			$item = $manager->createItem()->fromArray( $list )->setId( null );
53
+			$item = $manager->createItem()->fromArray($list)->setId(null);
54 54
 
55 55
 			/** controller/frontend/customer/groupids
56 56
 			 * List of groups new customers should be assigned to
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 			 * @category User
65 65
 			 * @category Developer
66 66
 			 */
67
-			$item->setGroups( (array) $config->get( 'controller/frontend/customer/groupids', [] ) );
67
+			$item->setGroups((array) $config->get('controller/frontend/customer/groupids', []));
68 68
 
69
-			$item = $manager->saveItem( $item );
69
+			$item = $manager->saveItem($item);
70 70
 
71 71
 			$msg = $item->toArray();
72 72
 			// Show only generated passwords in account creation e-mails
73
-			$msg['customer.password'] = ( isset( $values['customer.password'] ) ? null : $passwd );
74
-			$context->getMessageQueue( 'mq-email', 'customer/email/account' )->add( json_encode( $msg ) );
73
+			$msg['customer.password'] = (isset($values['customer.password']) ? null : $passwd);
74
+			$context->getMessageQueue('mq-email', 'customer/email/account')->add(json_encode($msg));
75 75
 		}
76 76
 
77 77
 		return $item;
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
85 85
 	 */
86
-	public function createItem( array $values = [] )
86
+	public function createItem(array $values = [])
87 87
 	{
88
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer' );
89
-		return $manager->createItem()->fromArray( $values )->setId( null );
88
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer');
89
+		return $manager->createItem()->fromArray($values)->setId(null);
90 90
 	}
91 91
 
92 92
 
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
 	 * @param string $id Unique customer ID
97 97
 	 * @since 2017.04
98 98
 	 */
99
-	public function deleteItem( $id )
99
+	public function deleteItem($id)
100 100
 	{
101
-		$this->checkUser( $id );
101
+		$this->checkUser($id);
102 102
 
103
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer' );
104
-		$manager->deleteItem( $id );
103
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer');
104
+		$manager->deleteItem($id);
105 105
 	}
106 106
 
107 107
 
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
114 114
 	 * @since 2017.04
115 115
 	 */
116
-	public function editItem( $id, array $values )
116
+	public function editItem($id, array $values)
117 117
 	{
118
-		$this->checkUser( $id );
119
-		unset( $values['customer.id'] );
118
+		$this->checkUser($id);
119
+		unset($values['customer.id']);
120 120
 
121
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer' );
122
-		$item = $manager->getItem( $id, ['customer/group'], true )->fromArray( $values );
121
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer');
122
+		$item = $manager->getItem($id, ['customer/group'], true)->fromArray($values);
123 123
 
124
-		return $manager->saveItem( $item );
124
+		return $manager->saveItem($item);
125 125
 	}
126 126
 
127 127
 
@@ -133,17 +133,17 @@  discard block
 block discarded – undo
133 133
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
134 134
 	 * @since 2017.04
135 135
 	 */
136
-	public function getItem( $id = null, array $domains = [] )
136
+	public function getItem($id = null, array $domains = [])
137 137
 	{
138
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer' );
138
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer');
139 139
 
140
-		if( $id == null ) {
141
-			return $manager->getItem( $this->getContext()->getUserId(), $domains, true );
140
+		if ($id == null) {
141
+			return $manager->getItem($this->getContext()->getUserId(), $domains, true);
142 142
 		}
143 143
 
144
-		$this->checkUser( $id );
144
+		$this->checkUser($id);
145 145
 
146
-		return $manager->getItem( $id, $domains, true );
146
+		return $manager->getItem($id, $domains, true);
147 147
 	}
148 148
 
149 149
 
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
158 158
 	 * @since 2017.04
159 159
 	 */
160
-	public function findItem( $code, array $domains = [] )
160
+	public function findItem($code, array $domains = [])
161 161
 	{
162
-		return \Aimeos\MShop::create( $this->getContext(), 'customer' )->findItem( $code, $domains, true );
162
+		return \Aimeos\MShop::create($this->getContext(), 'customer')->findItem($code, $domains, true);
163 163
 	}
164 164
 
165 165
 
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
 	 * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item
170 170
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
171 171
 	 */
172
-	public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item )
172
+	public function saveItem(\Aimeos\MShop\Customer\Item\Iface $item)
173 173
 	{
174
-		return \Aimeos\MShop::create( $this->getContext(), 'customer' )->saveItem( $item );
174
+		return \Aimeos\MShop::create($this->getContext(), 'customer')->saveItem($item);
175 175
 	}
176 176
 
177 177
 
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
183 183
 	 * @since 2017.04
184 184
 	 */
185
-	public function addAddressItem( array $values )
185
+	public function addAddressItem(array $values)
186 186
 	{
187 187
 		$context = $this->getContext();
188
-		$manager = \Aimeos\MShop::create( $context, 'customer/address' );
188
+		$manager = \Aimeos\MShop::create($context, 'customer/address');
189 189
 
190
-		$item = $manager->createItem()->fromArray( $values )->setId( null )->setParentId( $context->getUserId() );
191
-		return $manager->saveItem( $item );
190
+		$item = $manager->createItem()->fromArray($values)->setId(null)->setParentId($context->getUserId());
191
+		return $manager->saveItem($item);
192 192
 	}
193 193
 
194 194
 
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
 	 *
198 198
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
199 199
 	 */
200
-	public function createAddressItem( array $values = [] )
200
+	public function createAddressItem(array $values = [])
201 201
 	{
202 202
 		$context = $this->getContext();
203
-		$manager = \Aimeos\MShop::create( $context, 'customer/address' );
203
+		$manager = \Aimeos\MShop::create($context, 'customer/address');
204 204
 
205
-		return $manager->createItem()->fromArray( $values )->setId( null )->setParentId( $context->getUserId() );
205
+		return $manager->createItem()->fromArray($values)->setId(null)->setParentId($context->getUserId());
206 206
 	}
207 207
 
208 208
 
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 	 * @param string $id Unique customer address ID
213 213
 	 * @since 2017.04
214 214
 	 */
215
-	public function deleteAddressItem( $id )
215
+	public function deleteAddressItem($id)
216 216
 	{
217
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/address' );
217
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/address');
218 218
 
219
-		$this->checkUser( $manager->getItem( $id, [], true )->getParentId() );
219
+		$this->checkUser($manager->getItem($id, [], true)->getParentId());
220 220
 
221
-		$manager->deleteItem( $id );
221
+		$manager->deleteItem($id);
222 222
 	}
223 223
 
224 224
 
@@ -230,15 +230,15 @@  discard block
 block discarded – undo
230 230
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
231 231
 	 * @since 2017.04
232 232
 	 */
233
-	public function editAddressItem( $id, array $values )
233
+	public function editAddressItem($id, array $values)
234 234
 	{
235
-		unset( $values['customer.address.id'] );
236
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/address' );
235
+		unset($values['customer.address.id']);
236
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/address');
237 237
 
238
-		$item = $manager->getItem( $id, [], true );
239
-		$this->checkUser( $item->getParentId() );
238
+		$item = $manager->getItem($id, [], true);
239
+		$this->checkUser($item->getParentId());
240 240
 
241
-		return $manager->saveItem( $item->fromArray( $values ) );
241
+		return $manager->saveItem($item->fromArray($values));
242 242
 	}
243 243
 
244 244
 
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
250 250
 	 * @since 2017.04
251 251
 	 */
252
-	public function getAddressItem( $id )
252
+	public function getAddressItem($id)
253 253
 	{
254
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/address' );
254
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/address');
255 255
 
256
-		$item = $manager->getItem( $id );
257
-		$this->checkUser( $item->getParentId() );
256
+		$item = $manager->getItem($id);
257
+		$this->checkUser($item->getParentId());
258 258
 
259 259
 		return $item;
260 260
 	}
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
 	 * @param \Aimeos\MShop\Customer\Item\Address\Iface $item Customer address item
267 267
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
268 268
 	 */
269
-	public function saveAddressItem( \Aimeos\MShop\Customer\Item\Address\Iface $item )
269
+	public function saveAddressItem(\Aimeos\MShop\Customer\Item\Address\Iface $item)
270 270
 	{
271
-		return \Aimeos\MShop::create( $this->getContext(), 'customer/address' )->saveItem( $item );
271
+		return \Aimeos\MShop::create($this->getContext(), 'customer/address')->saveItem($item);
272 272
 	}
273 273
 
274 274
 
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
280 280
 	 * @since 2017.06
281 281
 	 */
282
-	public function addListItem( array $values )
282
+	public function addListItem(array $values)
283 283
 	{
284 284
 		$context = $this->getContext();
285
-		$manager = \Aimeos\MShop::create( $context, 'customer/lists' );
285
+		$manager = \Aimeos\MShop::create($context, 'customer/lists');
286 286
 
287
-		$item = $manager->createItem()->fromArray( $values )->setId( null )->setParentId( $context->getUserId() );
288
-		return $manager->saveItem( $item );
287
+		$item = $manager->createItem()->fromArray($values)->setId(null)->setParentId($context->getUserId());
288
+		return $manager->saveItem($item);
289 289
 	}
290 290
 
291 291
 
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
 	public function createListsFilter()
299 299
 	{
300 300
 		$context = $this->getContext();
301
-		$manager = \Aimeos\MShop::create( $context, 'customer/lists' );
301
+		$manager = \Aimeos\MShop::create($context, 'customer/lists');
302 302
 
303 303
 		$filter = $manager->createSearch();
304
-		$filter->setConditions( $filter->compare( '==', 'customer.lists.parentid', $context->getUserId() ) );
304
+		$filter->setConditions($filter->compare('==', 'customer.lists.parentid', $context->getUserId()));
305 305
 
306 306
 		return $filter;
307 307
 	}
@@ -313,13 +313,13 @@  discard block
 block discarded – undo
313 313
 	 * @param string $id Unique customer address ID
314 314
 	 * @since 2017.06
315 315
 	 */
316
-	public function deleteListItem( $id )
316
+	public function deleteListItem($id)
317 317
 	{
318
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/lists' );
318
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/lists');
319 319
 
320
-		$this->checkUser( $manager->getItem( $id )->getParentId() );
320
+		$this->checkUser($manager->getItem($id)->getParentId());
321 321
 
322
-		$manager->deleteItem( $id );
322
+		$manager->deleteItem($id);
323 323
 	}
324 324
 
325 325
 
@@ -331,16 +331,16 @@  discard block
 block discarded – undo
331 331
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
332 332
 	 * @since 2017.06
333 333
 	 */
334
-	public function editListItem( $id, array $values )
334
+	public function editListItem($id, array $values)
335 335
 	{
336 336
 		$context = $this->getContext();
337
-		$manager = \Aimeos\MShop::create( $context, 'customer/lists' );
337
+		$manager = \Aimeos\MShop::create($context, 'customer/lists');
338 338
 
339
-		$item = $manager->getItem( $id, [], true );
340
-		$this->checkUser( $item->getParentId() );
341
-		unset( $values['customer.lists.id'] );
339
+		$item = $manager->getItem($id, [], true);
340
+		$this->checkUser($item->getParentId());
341
+		unset($values['customer.lists.id']);
342 342
 
343
-		return $manager->saveItem( $item->fromArray( $values ) );
343
+		return $manager->saveItem($item->fromArray($values));
344 344
 	}
345 345
 
346 346
 
@@ -351,12 +351,12 @@  discard block
 block discarded – undo
351 351
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
352 352
 	 * @since 2017.06
353 353
 	 */
354
-	public function getListItem( $id )
354
+	public function getListItem($id)
355 355
 	{
356
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/lists' );
357
-		$item = $manager->getItem( $id );
356
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/lists');
357
+		$item = $manager->getItem($id);
358 358
 
359
-		$this->checkUser( $item->getParentId() );
359
+		$this->checkUser($item->getParentId());
360 360
 
361 361
 		return $item;
362 362
 	}
@@ -370,11 +370,11 @@  discard block
 block discarded – undo
370 370
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface[] Customer list items
371 371
 	 * @since 2017.06
372 372
 	 */
373
-	public function searchListItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
373
+	public function searchListItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
374 374
 	{
375
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'customer/lists' );
375
+		$manager = \Aimeos\MShop::create($this->getContext(), 'customer/lists');
376 376
 
377
-		return $manager->searchItems( $filter, [], $total );
377
+		return $manager->searchItems($filter, [], $total);
378 378
 	}
379 379
 
380 380
 
@@ -384,33 +384,33 @@  discard block
 block discarded – undo
384 384
 	 * @param string[] $values Associative list of customer keys (e.g. "customer.label") and their values
385 385
 	 * @return string[] Associative list of customer key/value pairs with default values set
386 386
 	 */
387
-	protected function addItemDefaults( array $values )
387
+	protected function addItemDefaults(array $values)
388 388
 	{
389
-		if( !isset( $values['customer.label'] ) || $values['customer.label'] == '' )
389
+		if (!isset($values['customer.label']) || $values['customer.label'] == '')
390 390
 		{
391 391
 			$label = '';
392 392
 
393
-			if( isset( $values['customer.lastname'] ) ) {
393
+			if (isset($values['customer.lastname'])) {
394 394
 				$label = $values['customer.lastname'];
395 395
 			}
396 396
 
397
-			if( isset( $values['customer.firstname'] ) && $values['customer.firstname'] != '' ) {
397
+			if (isset($values['customer.firstname']) && $values['customer.firstname'] != '') {
398 398
 				$label = $values['customer.firstname'] . ' ' . $label;
399 399
 			}
400 400
 
401
-			if( isset( $values['customer.company'] ) && $values['customer.company'] != '' ) {
401
+			if (isset($values['customer.company']) && $values['customer.company'] != '') {
402 402
 				$label .= ' (' . $values['customer.company'] . ')';
403 403
 			}
404 404
 
405 405
 			$values['customer.label'] = $label;
406 406
 		}
407 407
 
408
-		if( !isset( $values['customer.code'] ) && isset( $values['customer.email'] ) ) {
408
+		if (!isset($values['customer.code']) && isset($values['customer.email'])) {
409 409
 			$values['customer.code'] = $values['customer.email'];
410 410
 		}
411 411
 
412
-		if( !isset( $values['customer.password'] ) ) {
413
-			$values['customer.password'] = substr( md5( microtime( true ) . getmypid() . rand() ), -8 );
412
+		if (!isset($values['customer.password'])) {
413
+			$values['customer.password'] = substr(md5(microtime(true) . getmypid() . rand()), -8);
414 414
 		}
415 415
 
416 416
 		return $values;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	 * @param string[] $values Associative list of customer keys (e.g. "customer.label") and their values
424 424
 	 * @throws \Aimeos\Controller\Frontend\Customer\Exception If access isn't allowed
425 425
 	 */
426
-	protected function checkLimit( array $values )
426
+	protected function checkLimit(array $values)
427 427
 	{
428 428
 		$total = 0;
429 429
 		$context = $this->getContext();
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 		 * @category Developer
445 445
 		 * @see controller/frontend/customer/limit-seconds
446 446
 		 */
447
-		$count = $config->get( 'controller/frontend/customer/limit-count', 5 );
447
+		$count = $config->get('controller/frontend/customer/limit-count', 5);
448 448
 
449 449
 		/** controller/frontend/customer/limit-seconds
450 450
 		 * Customer account limitation time frame in seconds
@@ -462,22 +462,22 @@  discard block
 block discarded – undo
462 462
 		 * @category Developer
463 463
 		 * @see controller/frontend/customer/limit-count
464 464
 		 */
465
-		$seconds = $config->get( 'controller/frontend/customer/limit-seconds', 300 );
465
+		$seconds = $config->get('controller/frontend/customer/limit-seconds', 300);
466 466
 
467
-		$manager = \Aimeos\MShop::create( $context, 'customer' );
467
+		$manager = \Aimeos\MShop::create($context, 'customer');
468 468
 
469 469
 		$search = $manager->createSearch();
470 470
 		$expr = [
471
-			$search->compare( '==', 'customer.editor', $context->getEditor() ),
472
-			$search->compare( '>=', 'customer.ctime', date( 'Y-m-d H:i:s', time() - $seconds ) ),
471
+			$search->compare('==', 'customer.editor', $context->getEditor()),
472
+			$search->compare('>=', 'customer.ctime', date('Y-m-d H:i:s', time() - $seconds)),
473 473
 		];
474
-		$search->setConditions( $search->combine( '&&', $expr ) );
475
-		$search->setSlice( 0, 0 );
474
+		$search->setConditions($search->combine('&&', $expr));
475
+		$search->setSlice(0, 0);
476 476
 
477
-		$manager->searchItems( $search, [], $total );
477
+		$manager->searchItems($search, [], $total);
478 478
 
479
-		if( $total > $count ) {
480
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( 'Temporary limit reached' ) );
479
+		if ($total > $count) {
480
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf('Temporary limit reached'));
481 481
 		}
482 482
 	}
483 483
 
@@ -488,12 +488,12 @@  discard block
 block discarded – undo
488 488
 	 * @param string $id Unique customer ID
489 489
 	 * @throws \Aimeos\Controller\Frontend\Customer\Exception If access isn't allowed
490 490
 	 */
491
-	protected function checkUser( $id )
491
+	protected function checkUser($id)
492 492
 	{
493
-		if( $id != $this->getContext()->getUserId() )
493
+		if ($id != $this->getContext()->getUserId())
494 494
 		{
495
-			$msg = sprintf( 'Not allowed to access customer data for ID "%1$s"', $id );
496
-			throw new \Aimeos\Controller\Frontend\Customer\Exception( $msg );
495
+			$msg = sprintf('Not allowed to access customer data for ID "%1$s"', $id);
496
+			throw new \Aimeos\Controller\Frontend\Customer\Exception($msg);
497 497
 		}
498 498
 	}
499 499
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Decorator/Select.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,10 +121,11 @@  discard block
 block discarded – undo
121 121
 		{
122 122
 			$msg = $context->getI18n()->dt( 'controller/frontend', 'No unique article found for selected attributes and product ID "%1$s"' );
123 123
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $productItem->getId() ) );
124
-		}
125
-		else if( ( $result = reset( $productItems ) ) !== false ) // count == 1
124
+		} else if( ( $result = reset( $productItems ) ) !== false ) {
125
+			// count == 1
126 126
 		{
127 127
 			$productItem = $result;
128
+		}
128 129
 			$orderBaseProductItem->setProductCode( $productItem->getCode() );
129 130
 
130 131
 			$subprices = $productItem->getRefItems( 'price', 'default', 'default' );
@@ -150,10 +151,11 @@  discard block
 block discarded – undo
150 151
 
151 152
 				$attr[] = $orderAttributeItem;
152 153
 			}
153
-		}
154
-		else if( $requireVariant != false ) // count == 0
154
+		} else if( $requireVariant != false ) {
155
+			// count == 0
155 156
 		{
156 157
 			$msg = $context->getI18n()->dt( 'controller/frontend', 'No article found for selected attributes and product ID "%1$s"' );
158
+		}
157 159
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $productItem->getId() ) );
158 160
 		}
159 161
 
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
 	 * @param string $stocktype Unique code of the stock type to deliver the products from
37 37
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available
38 38
 	 */
39
-	public function addProduct( $prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
40
-		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [] )
39
+	public function addProduct($prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
40
+		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [])
41 41
 	{
42 42
 		$context = $this->getContext();
43
-		$productManager = \Aimeos\MShop::create( $context, 'product' );
44
-		$productItem = $productManager->getItem( $prodid, [], true );
43
+		$productManager = \Aimeos\MShop::create($context, 'product');
44
+		$productItem = $productManager->getItem($prodid, [], true);
45 45
 
46
-		if( $productManager->getItem( $prodid, [], true )->getType() !== 'select' )
46
+		if ($productManager->getItem($prodid, [], true)->getType() !== 'select')
47 47
 		{
48 48
 			return $this->getController()->addProduct(
49 49
 				$prodid, $quantity, $stocktype, $variantAttributeIds,
@@ -51,30 +51,30 @@  discard block
 block discarded – undo
51 51
 			);
52 52
 		}
53 53
 
54
-		$productItem = $productManager->getItem( $prodid, ['attribute', 'media', 'supplier', 'price', 'product', 'text'], true );
55
-		$prices = $productItem->getRefItems( 'price', 'default', 'default' );
56
-		$hidden = $productItem->getRefItems( 'attribute', null, 'hidden' );
54
+		$productItem = $productManager->getItem($prodid, ['attribute', 'media', 'supplier', 'price', 'product', 'text'], true);
55
+		$prices = $productItem->getRefItems('price', 'default', 'default');
56
+		$hidden = $productItem->getRefItems('attribute', null, 'hidden');
57 57
 
58
-		$orderBaseProductItem = \Aimeos\MShop::create( $context, 'order/base/product' )->createItem();
59
-		$orderBaseProductItem->copyFrom( $productItem )->setQuantity( $quantity )->setStockType( $stocktype );
58
+		$orderBaseProductItem = \Aimeos\MShop::create($context, 'order/base/product')->createItem();
59
+		$orderBaseProductItem->copyFrom($productItem)->setQuantity($quantity)->setStockType($stocktype);
60 60
 
61
-		$attr = $this->getVariantDetails( $orderBaseProductItem, $productItem, $prices, $variantAttributeIds );
62
-		$hidden += $productItem->getRefItems( 'attribute', null, 'hidden' );
61
+		$attr = $this->getVariantDetails($orderBaseProductItem, $productItem, $prices, $variantAttributeIds);
62
+		$hidden += $productItem->getRefItems('attribute', null, 'hidden');
63 63
 
64 64
 		$attributeMap = [
65
-			'custom' => array_keys( $customAttributeValues ),
66
-			'config' => array_keys( $configAttributeIds ),
65
+			'custom' => array_keys($customAttributeValues),
66
+			'config' => array_keys($configAttributeIds),
67 67
 		];
68
-		$this->checkListRef( array( $prodid, $productItem->getId() ), 'attribute', $attributeMap );
68
+		$this->checkListRef(array($prodid, $productItem->getId()), 'attribute', $attributeMap);
69 69
 
70
-		$custAttr = $this->getOrderProductAttributes( 'custom', array_keys( $customAttributeValues ), $customAttributeValues );
71
-		$confAttr = $this->getOrderProductAttributes( 'config', array_keys( $configAttributeIds ), [], $configAttributeIds );
72
-		$attr = array_merge( $attr, $custAttr, $confAttr, $this->getOrderProductAttributes( 'hidden', array_keys( $hidden ) ) );
70
+		$custAttr = $this->getOrderProductAttributes('custom', array_keys($customAttributeValues), $customAttributeValues);
71
+		$confAttr = $this->getOrderProductAttributes('config', array_keys($configAttributeIds), [], $configAttributeIds);
72
+		$attr = array_merge($attr, $custAttr, $confAttr, $this->getOrderProductAttributes('hidden', array_keys($hidden)));
73 73
 
74
-		$orderBaseProductItem->setAttributeItems( $attr );
75
-		$orderBaseProductItem->setPrice( $this->calcPrice( $orderBaseProductItem, $prices, $quantity ) );
74
+		$orderBaseProductItem->setAttributeItems($attr);
75
+		$orderBaseProductItem->setPrice($this->calcPrice($orderBaseProductItem, $prices, $quantity));
76 76
 
77
-		$this->getController()->get()->addProduct( $orderBaseProductItem );
77
+		$this->getController()->get()->addProduct($orderBaseProductItem);
78 78
 		$this->getController()->save();
79 79
 	}
80 80
 
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Order\Item\Base\Product\Attribute\Iface[] List of order product attributes
90 90
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If no product variant is found
91 91
 	 */
92
-	protected function getVariantDetails( \Aimeos\MShop\Order\Item\Base\Product\Iface $orderBaseProductItem,
93
-		\Aimeos\MShop\Product\Item\Iface &$productItem, array &$prices, array $variantAttributeIds )
92
+	protected function getVariantDetails(\Aimeos\MShop\Order\Item\Base\Product\Iface $orderBaseProductItem,
93
+		\Aimeos\MShop\Product\Item\Iface &$productItem, array &$prices, array $variantAttributeIds)
94 94
 	{
95 95
 		$attr = [];
96 96
 		$context = $this->getContext();
97
-		$productItems = $this->getProductVariants( $productItem, $variantAttributeIds );
97
+		$productItems = $this->getProductVariants($productItem, $variantAttributeIds);
98 98
 
99 99
 		/** controller/frontend/basket/require-variant
100 100
 		 * A variant of a selection product must be chosen
@@ -115,47 +115,47 @@  discard block
 block discarded – undo
115 115
 		 * @category Developer
116 116
 		 * @category User
117 117
 		 */
118
-		$requireVariant = $context->getConfig()->get( 'controller/frontend/basket/require-variant', true );
118
+		$requireVariant = $context->getConfig()->get('controller/frontend/basket/require-variant', true);
119 119
 
120 120
 
121
-		if( count( $productItems ) > 1 )
121
+		if (count($productItems) > 1)
122 122
 		{
123
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'No unique article found for selected attributes and product ID "%1$s"' );
124
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $productItem->getId() ) );
123
+			$msg = $context->getI18n()->dt('controller/frontend', 'No unique article found for selected attributes and product ID "%1$s"');
124
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $productItem->getId()));
125 125
 		}
126
-		else if( ( $result = reset( $productItems ) ) !== false ) // count == 1
126
+		else if (($result = reset($productItems)) !== false) // count == 1
127 127
 		{
128 128
 			$productItem = $result;
129
-			$orderBaseProductItem->setProductCode( $productItem->getCode() );
129
+			$orderBaseProductItem->setProductCode($productItem->getCode());
130 130
 
131
-			$subprices = $productItem->getRefItems( 'price', 'default', 'default' );
131
+			$subprices = $productItem->getRefItems('price', 'default', 'default');
132 132
 
133
-			if( !empty( $subprices ) ) {
133
+			if (!empty($subprices)) {
134 134
 				$prices = $subprices;
135 135
 			}
136 136
 
137
-			$submedia = $productItem->getRefItems( 'media', 'default', 'default' );
137
+			$submedia = $productItem->getRefItems('media', 'default', 'default');
138 138
 
139
-			if( ( $mediaItem = reset( $submedia ) ) !== false ) {
140
-				$orderBaseProductItem->setMediaUrl( $mediaItem->getPreview() );
139
+			if (($mediaItem = reset($submedia)) !== false) {
140
+				$orderBaseProductItem->setMediaUrl($mediaItem->getPreview());
141 141
 			}
142 142
 
143
-			$orderProductAttrManager = \Aimeos\MShop::create( $this->getContext(), 'order/base/product/attribute' );
144
-			$variantAttributes = $productItem->getRefItems( 'attribute', null, 'variant' );
143
+			$orderProductAttrManager = \Aimeos\MShop::create($this->getContext(), 'order/base/product/attribute');
144
+			$variantAttributes = $productItem->getRefItems('attribute', null, 'variant');
145 145
 
146
-			foreach( $this->getAttributes( array_keys( $variantAttributes ), array( 'text' ) ) as $attrItem )
146
+			foreach ($this->getAttributes(array_keys($variantAttributes), array('text')) as $attrItem)
147 147
 			{
148 148
 				$orderAttributeItem = $orderProductAttrManager->createItem();
149
-				$orderAttributeItem->copyFrom( $attrItem );
150
-				$orderAttributeItem->setType( 'variant' );
149
+				$orderAttributeItem->copyFrom($attrItem);
150
+				$orderAttributeItem->setType('variant');
151 151
 
152 152
 				$attr[] = $orderAttributeItem;
153 153
 			}
154 154
 		}
155
-		else if( $requireVariant != false ) // count == 0
155
+		else if ($requireVariant != false) // count == 0
156 156
 		{
157
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'No article found for selected attributes and product ID "%1$s"' );
158
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $productItem->getId() ) );
157
+			$msg = $context->getI18n()->dt('controller/frontend', 'No article found for selected attributes and product ID "%1$s"');
158
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $productItem->getId()));
159 159
 		}
160 160
 
161 161
 		return $attr;
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Subscription/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 	/**
134 134
 	 * Returns the frontend controller
135 135
 	 *
136
-	 * @return \Aimeos\Controller\Frontend\Subscription\Iface Frontend controller object
136
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
137 137
 	 */
138 138
 	protected function getController()
139 139
 	{
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Subscription\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Subscription\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	 * @param string $id Unique subscription ID
61 61
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Canceled subscription item
62 62
 	 */
63
-	public function cancel( $id )
63
+	public function cancel($id)
64 64
 	{
65
-		return $this->controller->cancel( $id );
65
+		return $this->controller->cancel($id);
66 66
 	}
67 67
 
68 68
 
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 	 * @param string $id Unique subscription ID
95 95
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Subscription object
96 96
 	 */
97
-	public function getItem( $id )
97
+	public function getItem($id)
98 98
 	{
99
-		return $this->controller->getItem( $id );
99
+		return $this->controller->getItem($id);
100 100
 	}
101 101
 
102 102
 
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 	 * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription object
107 107
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Saved subscription item
108 108
 	 */
109
-	public function saveItem( \Aimeos\MShop\Subscription\Item\Iface $item )
109
+	public function saveItem(\Aimeos\MShop\Subscription\Item\Iface $item)
110 110
 	{
111
-		return $this->controller->saveItem( $item );
111
+		return $this->controller->saveItem($item);
112 112
 	}
113 113
 
114 114
 
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * @param integer &$total|null Variable that will contain the total number of available items
120 120
 	 * @return \Aimeos\MShop\Subscription\Item\Iface[] Associative list of IDs as keys and subscription objects as values
121 121
 	 */
122
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
122
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
123 123
 	{
124
-		return $this->controller->searchItems( $filter, $total );
124
+		return $this->controller->searchItems($filter, $total);
125 125
 	}
126 126
 
127 127
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Subscription/Iface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param string $id Unique subscription ID
26 26
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Canceled subscription item
27 27
 	 */
28
-	public function cancel( $id );
28
+	public function cancel($id);
29 29
 
30 30
 	/**
31 31
 	 * Returns the filter for searching items
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param string $id Unique subscription ID
48 48
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Subscription object
49 49
 	 */
50
-	public function getItem( $id );
50
+	public function getItem($id);
51 51
 
52 52
 	/**
53 53
 	 * Saves the modified subscription item
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription object
56 56
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Saved subscription item
57 57
 	 */
58
-	public function saveItem( \Aimeos\MShop\Subscription\Item\Iface $item );
58
+	public function saveItem(\Aimeos\MShop\Subscription\Item\Iface $item);
59 59
 
60 60
 	/**
61 61
 	 * Returns the subscription items based on the given filter that belong to the current user
@@ -64,5 +64,5 @@  discard block
 block discarded – undo
64 64
 	 * @param integer &$total|null Variable that will contain the total number of available items
65 65
 	 * @return \Aimeos\MShop\Subscription\Item\Iface[] Associative list of IDs as keys and subscription objects as values
66 66
 	 */
67
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
67
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
68 68
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 	/**
119 119
 	 * Returns the frontend controller
120 120
 	 *
121
-	 * @return \Aimeos\Controller\Frontend\Supplier\Iface Frontend controller object
121
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
122 122
 	 */
123 123
 	protected function getController()
124 124
 	{
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Supplier\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Supplier\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Supplier\Item\Iface Supplier item including the referenced domains items
76 76
 	 * @since 2018.07
77 77
 	 */
78
-	public function getItem( $id, array $domains = array( 'media', 'text' ) )
78
+	public function getItem($id, array $domains = array('media', 'text'))
79 79
 	{
80
-		return $this->controller->getItem( $id, $domains );
80
+		return $this->controller->getItem($id, $domains);
81 81
 	}
82 82
 
83 83
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Supplier\Item\Iface[] Associative list of supplier item including the referenced domains items
90 90
 	 * @since 2018.07
91 91
 	 */
92
-	public function getItems( array $ids, array $domains = array( 'media', 'text' ) )
92
+	public function getItems(array $ids, array $domains = array('media', 'text'))
93 93
 	{
94
-		return $this->controller->getItems( $ids, $domains );
94
+		return $this->controller->getItems($ids, $domains);
95 95
 	}
96 96
 
97 97
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @return array Ordered list of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface
105 105
 	 * @since 2018.07
106 106
 	 */
107
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'text' ), &$total = null )
107
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'text'), &$total = null)
108 108
 	{
109
-		return $this->controller->searchItems( $filter, $domains, $total );
109
+		return $this->controller->searchItems($filter, $domains, $total);
110 110
 	}
111 111
 
112 112
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Iface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @return \Aimeos\MShop\Supplier\Item\Iface Supplier item including the referenced domains items
37 37
 	 * @since 2018.07
38 38
 	 */
39
-	public function getItem( $id, array $domains = array( 'media', 'text' ) );
39
+	public function getItem($id, array $domains = array('media', 'text'));
40 40
 
41 41
 
42 42
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return \Aimeos\MShop\Supplier\Item\Iface[] Associative list of supplier item including the referenced domains items
48 48
 	 * @since 2018.07
49 49
 	 */
50
-	public function getItems( array $ids, array $domains = array( 'media', 'text' ) );
50
+	public function getItems(array $ids, array $domains = array('media', 'text'));
51 51
 
52 52
 
53 53
 	/**
@@ -59,5 +59,5 @@  discard block
 block discarded – undo
59 59
 	 * @return array Ordered list of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface
60 60
 	 * @since 2018.07
61 61
 	 */
62
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'text' ), &$total = null );
62
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'text'), &$total = null);
63 63
 }
Please login to merge, or discard this patch.
controller/frontend/tests/Controller/Frontend/BaseTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,31 +18,31 @@
 block discarded – undo
18 18
 	{
19 19
 		$context = \TestHelperFrontend::getContext();
20 20
 
21
-		$this->object = $this->getMockBuilder( \Aimeos\Controller\Frontend\Base::class )
22
-			->setConstructorArgs( [$context] )
21
+		$this->object = $this->getMockBuilder(\Aimeos\Controller\Frontend\Base::class)
22
+			->setConstructorArgs([$context])
23 23
 			->getMockForAbstractClass();
24 24
 	}
25 25
 
26 26
 
27 27
 	protected function tearDown()
28 28
 	{
29
-		unset( $this->object );
29
+		unset($this->object);
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testGetContext()
34 34
 	{
35
-		$result = $this->access( 'getContext' )->invokeArgs( $this->object, [] );
35
+		$result = $this->access('getContext')->invokeArgs($this->object, []);
36 36
 
37
-		$this->assertInstanceOf( \Aimeos\MShop\Context\Item\Iface::class, $result );
37
+		$this->assertInstanceOf(\Aimeos\MShop\Context\Item\Iface::class, $result);
38 38
 	}
39 39
 
40 40
 
41
-	protected function access( $name )
41
+	protected function access($name)
42 42
 	{
43
-		$class = new \ReflectionClass( \Aimeos\Controller\Frontend\Base::class );
44
-		$method = $class->getMethod( $name );
45
-		$method->setAccessible( true );
43
+		$class = new \ReflectionClass(\Aimeos\Controller\Frontend\Base::class);
44
+		$method = $class->getMethod($name);
45
+		$method->setAccessible(true);
46 46
 
47 47
 		return $method;
48 48
 	}
Please login to merge, or discard this patch.