Completed
Push — master ( 1ffc07...6d81ff )
by Aimeos
06:29
created
lib/custom/src/MShop/Customer/Manager/Ezpublish.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	/**
227 227
 	 * Removes old entries from the storage.
228 228
 	 *
229
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
229
+	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
230 230
 	 */
231 231
 	public function cleanup( array $siteids )
232 232
 	{
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	/**
252 252
 	 * Removes multiple items specified by ids in the array.
253 253
 	 *
254
-	 * @param array $ids List of IDs
254
+	 * @param integer[] $ids List of IDs
255 255
 	 */
256 256
 	public function deleteItems( array $ids )
257 257
 	{
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 *
283 283
 	 * @param string $manager Name of the sub manager type in lower case
284 284
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
285
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
285
+	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g stock, tags, locations, etc.
286 286
 	 */
287 287
 	public function getSubManager( $manager, $name = null )
288 288
 	{
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 *
296 296
 	 * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object
297 297
 	 * @param boolean $fetch True if the new ID should be returned in the item
298
-	 * @return \Aimeos\MShop\Common\Item\Iface $item Updated item including the generated ID
298
+	 * @return \Aimeos\MShop\Common\Item\ListRef\Iface $item Updated item including the generated ID
299 299
 	 */
300 300
 	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
301 301
 	{
Please login to merge, or discard this patch.
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 	 *
229 229
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
230 230
 	 */
231
-	public function cleanup( array $siteids )
231
+	public function cleanup(array $siteids)
232 232
 	{
233 233
 		$path = 'mshop/customer/manager/submanagers';
234
-		foreach( $this->getContext()->getConfig()->get( $path, ['address', 'group', 'lists', 'property'] ) as $domain ) {
235
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
234
+		foreach ($this->getContext()->getConfig()->get($path, ['address', 'group', 'lists', 'property']) as $domain) {
235
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
236 236
 		}
237 237
 	}
238 238
 
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
 	 *
254 254
 	 * @param array $ids List of IDs
255 255
 	 */
256
-	public function deleteItems( array $ids )
256
+	public function deleteItems(array $ids)
257 257
 	{
258 258
 		$service = $this->getContext()->getEzUserService();
259 259
 
260
-		foreach( $ids as $id ) {
261
-			$service->deleteUser( $service->loadUser( $id ) );
260
+		foreach ($ids as $id) {
261
+			$service->deleteUser($service->loadUser($id));
262 262
 		}
263 263
 	}
264 264
 
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 	 * @param boolean $withsub Return also attributes of sub-managers if true
270 270
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
271 271
 	 */
272
-	public function getSearchAttributes( $withsub = true )
272
+	public function getSearchAttributes($withsub = true)
273 273
 	{
274 274
 		$path = 'mshop/customer/manager/submanagers';
275 275
 
276
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, ['address', 'group', 'lists', 'property'], $withsub );
276
+		return $this->getSearchAttributesBase($this->searchConfig, $path, ['address', 'group', 'lists', 'property'], $withsub);
277 277
 	}
278 278
 
279 279
 
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
285 285
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
286 286
 	 */
287
-	public function getSubManager( $manager, $name = null )
287
+	public function getSubManager($manager, $name = null)
288 288
 	{
289
-		return $this->getSubManagerBase( 'customer', $manager, ( $name === null ? 'Ezpublish' : $name ) );
289
+		return $this->getSubManagerBase('customer', $manager, ($name === null ? 'Ezpublish' : $name));
290 290
 	}
291 291
 
292 292
 
@@ -297,99 +297,99 @@  discard block
 block discarded – undo
297 297
 	 * @param boolean $fetch True if the new ID should be returned in the item
298 298
 	 * @return \Aimeos\MShop\Common\Item\Iface $item Updated item including the generated ID
299 299
 	 */
300
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
300
+	public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
301 301
 	{
302 302
 		$iface = '\\Aimeos\\MShop\\Customer\\Item\\Iface';
303
-		if( !( $item instanceof $iface ) ) {
304
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $iface ) );
303
+		if (!($item instanceof $iface)) {
304
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Object is not of required type "%1$s"', $iface));
305 305
 		}
306 306
 
307
-		if( !$item->isModified() )
307
+		if (!$item->isModified())
308 308
 		{
309
-			$item = $this->savePropertyItems( $item, 'customer' );
310
-			$item = $this->saveAddressItems( $item, 'customer' );
311
-			return $this->saveListItems( $item, 'customer' );
309
+			$item = $this->savePropertyItems($item, 'customer');
310
+			$item = $this->saveAddressItems($item, 'customer');
311
+			return $this->saveListItems($item, 'customer');
312 312
 		}
313 313
 
314 314
 		$context = $this->getContext();
315 315
 
316 316
 		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
317
-		if( !is_a( $context, $class ) ) {
318
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $class ) );
317
+		if (!is_a($context, $class)) {
318
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Object is not of required type "%1$s"', $class));
319 319
 		}
320 320
 
321 321
 		$service = $context->getEzUserService();
322 322
 		$email = $item->getPaymentAddress()->getEmail();
323 323
 
324
-		if( $item->getId() !== null )
324
+		if ($item->getId() !== null)
325 325
 		{
326 326
 			$struct = $service->newUserUpdateStruct();
327 327
 			$struct->password = $item->getPassword();
328 328
 			$struct->enabled = $item->getStatus();
329 329
 			$struct->email = $email;
330 330
 
331
-			$user = $service->loadUser( $item->getId() );
332
-			$service->updateUser( $user, $struct );
331
+			$user = $service->loadUser($item->getId());
332
+			$service->updateUser($user, $struct);
333 333
 		}
334 334
 		else
335 335
 		{
336
-			$struct = $service->newUserCreateStruct( $item->getCode(), $email, $item->getPassword(), 'eng-GB' );
336
+			$struct = $service->newUserCreateStruct($item->getCode(), $email, $item->getPassword(), 'eng-GB');
337 337
 			$struct->enabled = $item->getStatus();
338 338
 
339
-			$user = $service->createUser( $struct, [] );
340
-			$item->setId( $user->getUserId() );
339
+			$user = $service->createUser($struct, []);
340
+			$item->setId($user->getUserId());
341 341
 		}
342 342
 
343 343
 		$dbm = $context->getDatabaseManager();
344 344
 		$dbname = $this->getResourceName();
345
-		$conn = $dbm->acquire( $dbname );
345
+		$conn = $dbm->acquire($dbname);
346 346
 
347 347
 		try
348 348
 		{
349
-			$date = date( 'Y-m-d H:i:s' );
350
-			$ctime = ( $item->getTimeCreated() ? $item->getTimeCreated() : $date );
349
+			$date = date('Y-m-d H:i:s');
350
+			$ctime = ($item->getTimeCreated() ? $item->getTimeCreated() : $date);
351 351
 			$billingAddress = $item->getPaymentAddress();
352 352
 
353 353
 			$path = 'mshop/customer/manager/ezpublish/update';
354
-			$stmt = $this->getCachedStatement( $conn, $path );
355
-
356
-			$stmt->bind( 1, $billingAddress->getCompany() );
357
-			$stmt->bind( 2, $billingAddress->getVatID() );
358
-			$stmt->bind( 3, $billingAddress->getSalutation() );
359
-			$stmt->bind( 4, $billingAddress->getTitle() );
360
-			$stmt->bind( 5, $billingAddress->getFirstname() );
361
-			$stmt->bind( 6, $billingAddress->getLastname() );
362
-			$stmt->bind( 7, $billingAddress->getAddress1() );
363
-			$stmt->bind( 8, $billingAddress->getAddress2() );
364
-			$stmt->bind( 9, $billingAddress->getAddress3() );
365
-			$stmt->bind( 10, $billingAddress->getPostal() );
366
-			$stmt->bind( 11, $billingAddress->getCity() );
367
-			$stmt->bind( 12, $billingAddress->getState() );
368
-			$stmt->bind( 13, $billingAddress->getCountryId() );
369
-			$stmt->bind( 14, $billingAddress->getLanguageId() );
370
-			$stmt->bind( 15, $billingAddress->getTelephone() );
371
-			$stmt->bind( 16, $billingAddress->getTelefax() );
372
-			$stmt->bind( 17, $billingAddress->getWebsite() );
373
-			$stmt->bind( 18, $item->getBirthday() );
374
-			$stmt->bind( 19, $item->getDateVerified() );
375
-			$stmt->bind( 20, $date ); // Modification time
376
-			$stmt->bind( 21, $context->getEditor() );
377
-			$stmt->bind( 22, $ctime ); // Creation time
378
-			$stmt->bind( 23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
354
+			$stmt = $this->getCachedStatement($conn, $path);
355
+
356
+			$stmt->bind(1, $billingAddress->getCompany());
357
+			$stmt->bind(2, $billingAddress->getVatID());
358
+			$stmt->bind(3, $billingAddress->getSalutation());
359
+			$stmt->bind(4, $billingAddress->getTitle());
360
+			$stmt->bind(5, $billingAddress->getFirstname());
361
+			$stmt->bind(6, $billingAddress->getLastname());
362
+			$stmt->bind(7, $billingAddress->getAddress1());
363
+			$stmt->bind(8, $billingAddress->getAddress2());
364
+			$stmt->bind(9, $billingAddress->getAddress3());
365
+			$stmt->bind(10, $billingAddress->getPostal());
366
+			$stmt->bind(11, $billingAddress->getCity());
367
+			$stmt->bind(12, $billingAddress->getState());
368
+			$stmt->bind(13, $billingAddress->getCountryId());
369
+			$stmt->bind(14, $billingAddress->getLanguageId());
370
+			$stmt->bind(15, $billingAddress->getTelephone());
371
+			$stmt->bind(16, $billingAddress->getTelefax());
372
+			$stmt->bind(17, $billingAddress->getWebsite());
373
+			$stmt->bind(18, $item->getBirthday());
374
+			$stmt->bind(19, $item->getDateVerified());
375
+			$stmt->bind(20, $date); // Modification time
376
+			$stmt->bind(21, $context->getEditor());
377
+			$stmt->bind(22, $ctime); // Creation time
378
+			$stmt->bind(23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT);
379 379
 
380 380
 			$stmt->execute()->finish();
381 381
 
382
-			$dbm->release( $conn, $dbname );
382
+			$dbm->release($conn, $dbname);
383 383
 		}
384
-		catch( \Exception $e )
384
+		catch (\Exception $e)
385 385
 		{
386
-			$dbm->release( $conn, $dbname );
386
+			$dbm->release($conn, $dbname);
387 387
 			throw $e;
388 388
 		}
389 389
 
390
-		$item = $this->savePropertyItems( $item, 'customer' );
391
-		$item = $this->saveAddressItems( $item, 'customer' );
392
-		return $this->saveListItems( $item, 'customer' );
390
+		$item = $this->savePropertyItems($item, 'customer');
391
+		$item = $this->saveAddressItems($item, 'customer');
392
+		return $this->saveListItems($item, 'customer');
393 393
 	}
394 394
 
395 395
 
@@ -401,11 +401,11 @@  discard block
 block discarded – undo
401 401
 	 * @return array List of items implementing \Aimeos\MShop\Customer\Item\Iface
402 402
 	 * @throws \Aimeos\MShop\Customer\Exception If creating items failed
403 403
 	 */
404
-	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
404
+	public function searchItems(\Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null)
405 405
 	{
406 406
 		$dbm = $this->getContext()->getDatabaseManager();
407 407
 		$dbname = $this->getResourceName();
408
-		$conn = $dbm->acquire( $dbname );
408
+		$conn = $dbm->acquire($dbname);
409 409
 		$map = [];
410 410
 
411 411
 		try
@@ -413,34 +413,34 @@  discard block
 block discarded – undo
413 413
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
414 414
 			$cfgPathSearch = 'mshop/customer/manager/ezpublish/search';
415 415
 			$cfgPathCount = 'mshop/customer/manager/ezpublish/count';
416
-			$required = array( 'customer' );
416
+			$required = array('customer');
417 417
 
418
-			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
418
+			$results = $this->searchItemsBase($conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level);
419 419
 
420
-			while( ( $row = $results->fetch() ) !== false )
420
+			while (($row = $results->fetch()) !== false)
421 421
 			{
422
-				$map[ $row['customer.id'] ] = $row;
423
-				$map[ $row['customer.id'] ]['groups'] = [];
422
+				$map[$row['customer.id']] = $row;
423
+				$map[$row['customer.id']]['groups'] = [];
424 424
 			}
425 425
 
426 426
 
427 427
 			$path = 'mshop/customer/manager/ezpublish/groups';
428
-			$stmt = $conn->create( $this->getGroupSql( array_keys( $map ), $path ) );
428
+			$stmt = $conn->create($this->getGroupSql(array_keys($map), $path));
429 429
 			$results = $stmt->execute();
430 430
 
431
-			while( ( $row = $results->fetch() ) !== false ) {
432
-				$map[ $row['contentobject_id'] ]['groups'][] = $row['role_id'];
431
+			while (($row = $results->fetch()) !== false) {
432
+				$map[$row['contentobject_id']]['groups'][] = $row['role_id'];
433 433
 			}
434 434
 
435
-			$dbm->release( $conn, $dbname );
435
+			$dbm->release($conn, $dbname);
436 436
 		}
437
-		catch( \Exception $e )
437
+		catch (\Exception $e)
438 438
 		{
439
-			$dbm->release( $conn, $dbname  );
439
+			$dbm->release($conn, $dbname);
440 440
 			throw $e;
441 441
 		}
442 442
 
443
-		return $this->buildItems( $map, $ref, 'customer' );
443
+		return $this->buildItems($map, $ref, 'customer');
444 444
 	}
445 445
 
446 446
 
@@ -453,15 +453,15 @@  discard block
 block discarded – undo
453 453
 	 * @param array $addresses List of address items of the customer item
454 454
 	 * @return \Aimeos\MShop\Customer\Item\Iface New customer item
455 455
 	 */
456
-	protected function createItemBase( array $values = [], array $listItems = [], array $refItems = [], array $addresses = [], array $propItems = [] )
456
+	protected function createItemBase(array $values = [], array $listItems = [], array $refItems = [], array $addresses = [], array $propItems = [])
457 457
 	{
458
-		if( !isset( $this->addressManager ) ) {
459
-			$this->addressManager = $this->getObject()->getSubManager( 'address' );
458
+		if (!isset($this->addressManager)) {
459
+			$this->addressManager = $this->getObject()->getSubManager('address');
460 460
 		}
461 461
 
462 462
 		$address = $this->addressManager->createItem();
463 463
 
464
-		return new \Aimeos\MShop\Customer\Item\Ezpublish( $address, $values, $listItems, $refItems, $addresses, $propItems );
464
+		return new \Aimeos\MShop\Customer\Item\Ezpublish($address, $values, $listItems, $refItems, $addresses, $propItems);
465 465
 	}
466 466
 
467 467
 
@@ -472,18 +472,18 @@  discard block
 block discarded – undo
472 472
 	 * @param string $cfgpath Configuration path to the SQL statement
473 473
 	 * @return string SQL statement ready for execution
474 474
 	 */
475
-	protected function getGroupSql( array $ids, $cfgpath )
475
+	protected function getGroupSql(array $ids, $cfgpath)
476 476
 	{
477
-		if( empty( $ids ) ) { return '1=1'; }
477
+		if (empty($ids)) { return '1=1'; }
478 478
 
479 479
 		$search = $this->getObject()->createSearch();
480
-		$search->setConditions( $search->compare( '==', 'id', $ids ) );
480
+		$search->setConditions($search->compare('==', 'id', $ids));
481 481
 
482
-		$types = array( 'id' => \Aimeos\MW\DB\Statement\Base::PARAM_INT );
483
-		$translations = array( 'id' => '"contentobject_id"' );
482
+		$types = array('id' => \Aimeos\MW\DB\Statement\Base::PARAM_INT);
483
+		$translations = array('id' => '"contentobject_id"');
484 484
 
485
-		$cond = $search->getConditionString( $types, $translations );
485
+		$cond = $search->getConditionString($types, $translations);
486 486
 
487
-		return str_replace( ':cond', $cond, $this->getSqlConfig( $cfgpath ) );
487
+		return str_replace(':cond', $cond, $this->getSqlConfig($cfgpath));
488 488
 	}
489 489
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/EzpublishTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,47 +16,47 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( \TestHelper::getContext(), 'Ezpublish' );
20
-		$this->object = $manager->getSubManager( 'property', 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager(\TestHelper::getContext(), 'Ezpublish');
20
+		$this->object = $manager->getSubManager('property', 'Ezpublish');
21 21
 	}
22 22
 
23 23
 
24 24
 	protected function tearDown()
25 25
 	{
26
-		unset( $this->object );
26
+		unset($this->object);
27 27
 	}
28 28
 
29 29
 
30 30
 	public function testCleanup()
31 31
 	{
32
-		$this->object->cleanup( array( -1 ) );
32
+		$this->object->cleanup(array( -1 ));
33 33
 	}
34 34
 
35 35
 
36 36
 	public function testGetSearchAttributes()
37 37
 	{
38 38
 		$attributes = $this->object->getSearchAttributes();
39
-		$this->assertGreaterThan( 0, count( $attributes ) );
39
+		$this->assertGreaterThan(0, count($attributes));
40 40
 
41
-		foreach( $attributes as $attribute ) {
42
-			$this->assertInstanceOf( '\Aimeos\MW\Criteria\Attribute\Iface', $attribute );
41
+		foreach ($attributes as $attribute) {
42
+			$this->assertInstanceOf('\Aimeos\MW\Criteria\Attribute\Iface', $attribute);
43 43
 		}
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testGetSubManager()
48 48
 	{
49
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') );
50
-		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') );
49
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type'));
50
+		$this->assertInstanceOf('\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard'));
51 51
 
52
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
53
-		$this->object->getSubManager( 'unknown' );
52
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
53
+		$this->object->getSubManager('unknown');
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testSaveItemInvalidItem()
58 58
 	{
59
-		$this->setExpectedException( '\Aimeos\MShop\Exception' );
60
-		$this->object->saveItem( new \Aimeos\MShop\Common\Item\Type\Standard( 'common.property.type.' ) );
59
+		$this->setExpectedException('\Aimeos\MShop\Exception');
60
+		$this->object->saveItem(new \Aimeos\MShop\Common\Item\Type\Standard('common.property.type.'));
61 61
 	}
62 62
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/Type/EzpublishTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( \TestHelper::getContext(), 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager(\TestHelper::getContext(), 'Ezpublish');
20 20
 
21
-		$listManager = $manager->getSubManager( 'property', 'Ezpublish' );
22
-		$this->object = $listManager->getSubManager( 'type', 'Ezpublish' );
21
+		$listManager = $manager->getSubManager('property', 'Ezpublish');
22
+		$this->object = $listManager->getSubManager('type', 'Ezpublish');
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset( $this->object );
28
+		unset($this->object);
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCleanup()
33 33
 	{
34
-		$this->object->cleanup( array( -1 ) );
34
+		$this->object->cleanup(array( -1 ));
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testGetSearchAttributes()
39 39
 	{
40 40
 		$attributes = $this->object->getSearchAttributes();
41
-		$this->assertGreaterThan( 0, count( $attributes ) );
41
+		$this->assertGreaterThan(0, count($attributes));
42 42
 
43
-		foreach( $attributes as $attribute ) {
44
-			$this->assertInstanceOf( '\Aimeos\MW\Criteria\Attribute\Iface', $attribute );
43
+		foreach ($attributes as $attribute) {
44
+			$this->assertInstanceOf('\Aimeos\MW\Criteria\Attribute\Iface', $attribute);
45 45
 		}
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetSubManager()
50 50
 	{
51
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
52
-		$this->object->getSubManager( 'unknown' );
51
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
52
+		$this->object->getSubManager('unknown');
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -8,176 +8,176 @@
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'ezuser' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
11
+		'ezuser' => function(\Doctrine\DBAL\Schema\Schema $schema) {
12 12
 
13
-			$table = $schema->createTable( 'ezuser' );
13
+			$table = $schema->createTable('ezuser');
14 14
 
15
-			$table->addColumn( 'contentobject_id', 'integer', [] );
16
-			$table->addColumn( 'email', 'string', array( 'length' => 150 ) );
17
-			$table->addColumn( 'login', 'string', array( 'length' => 150 ) );
18
-			$table->addColumn( 'login_normalized', 'string', array( 'length' => 150 ) );
19
-			$table->addColumn( 'password_hash', 'string', array( 'length' => 50 ) );
20
-			$table->addColumn( 'password_hash_type', 'integer', array( 'default' => 1 ) );
15
+			$table->addColumn('contentobject_id', 'integer', []);
16
+			$table->addColumn('email', 'string', array('length' => 150));
17
+			$table->addColumn('login', 'string', array('length' => 150));
18
+			$table->addColumn('login_normalized', 'string', array('length' => 150));
19
+			$table->addColumn('password_hash', 'string', array('length' => 50));
20
+			$table->addColumn('password_hash_type', 'integer', array('default' => 1));
21 21
 
22
-			$table->setPrimaryKey( array( 'contentobject_id' ) );
23
-			$table->addUniqueIndex( array( 'login_normalized' ), 'ezuser_login' );
22
+			$table->setPrimaryKey(array('contentobject_id'));
23
+			$table->addUniqueIndex(array('login_normalized'), 'ezuser_login');
24 24
 
25 25
 			return $schema;
26 26
 		},
27 27
 
28
-		'ezuser_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
29
-
30
-			$table = $schema->createTable( 'ezuser_address' );
31
-
32
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
33
-			$table->addColumn( 'siteid', 'integer', [] );
34
-			$table->addColumn( 'parentid', 'integer', [] );
35
-			$table->addColumn( 'company', 'string', array( 'length' => 100 ) );
36
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32 ) );
37
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8 ) );
38
-			$table->addColumn( 'title', 'string', array( 'length' => 64 ) );
39
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64 ) );
40
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64 ) );
41
-			$table->addColumn( 'address1', 'string', array( 'length' => 255 ) );
42
-			$table->addColumn( 'address2', 'string', array( 'length' => 255 ) );
43
-			$table->addColumn( 'address3', 'string', array( 'length' => 255 ) );
44
-			$table->addColumn( 'postal', 'string', array( 'length' => 16 ) );
45
-			$table->addColumn( 'city', 'string', array( 'length' => 255 ) );
46
-			$table->addColumn( 'state', 'string', array( 'length' => 255 ) );
47
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
48
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
49
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32 ) );
50
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
51
-			$table->addColumn( 'telefax', 'string', array( 'length' => 255 ) );
52
-			$table->addColumn( 'website', 'string', array( 'length' => 255 ) );
53
-			$table->addColumn( 'flag', 'integer', [] );
54
-			$table->addColumn( 'pos', 'smallint', [] );
55
-			$table->addColumn( 'mtime', 'datetime', [] );
56
-			$table->addColumn( 'ctime', 'datetime', [] );
57
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
58
-
59
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpad_id' );
60
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_ezpad_ln_fn' );
61
-			$table->addIndex( array( 'address1', 'address2' ), 'idx_ezpad_ad1_ad2' );
62
-			$table->addIndex( array( 'postal', 'city' ), 'idx_ezpad_post_ci' );
63
-			$table->addIndex( array( 'parentid' ), 'idx_ezpad_pid' );
64
-			$table->addIndex( array( 'city' ), 'idx_ezpad_city' );
65
-
66
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
67
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezpad_pid' );
28
+		'ezuser_address' => function(\Doctrine\DBAL\Schema\Schema $schema) {
29
+
30
+			$table = $schema->createTable('ezuser_address');
31
+
32
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
33
+			$table->addColumn('siteid', 'integer', []);
34
+			$table->addColumn('parentid', 'integer', []);
35
+			$table->addColumn('company', 'string', array('length' => 100));
36
+			$table->addColumn('vatid', 'string', array('length' => 32));
37
+			$table->addColumn('salutation', 'string', array('length' => 8));
38
+			$table->addColumn('title', 'string', array('length' => 64));
39
+			$table->addColumn('firstname', 'string', array('length' => 64));
40
+			$table->addColumn('lastname', 'string', array('length' => 64));
41
+			$table->addColumn('address1', 'string', array('length' => 255));
42
+			$table->addColumn('address2', 'string', array('length' => 255));
43
+			$table->addColumn('address3', 'string', array('length' => 255));
44
+			$table->addColumn('postal', 'string', array('length' => 16));
45
+			$table->addColumn('city', 'string', array('length' => 255));
46
+			$table->addColumn('state', 'string', array('length' => 255));
47
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
48
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
49
+			$table->addColumn('telephone', 'string', array('length' => 32));
50
+			$table->addColumn('email', 'string', array('length' => 255));
51
+			$table->addColumn('telefax', 'string', array('length' => 255));
52
+			$table->addColumn('website', 'string', array('length' => 255));
53
+			$table->addColumn('flag', 'integer', []);
54
+			$table->addColumn('pos', 'smallint', []);
55
+			$table->addColumn('mtime', 'datetime', []);
56
+			$table->addColumn('ctime', 'datetime', []);
57
+			$table->addColumn('editor', 'string', array('length' => 255));
58
+
59
+			$table->setPrimaryKey(array('id'), 'pk_ezpad_id');
60
+			$table->addIndex(array('lastname', 'firstname'), 'idx_ezpad_ln_fn');
61
+			$table->addIndex(array('address1', 'address2'), 'idx_ezpad_ad1_ad2');
62
+			$table->addIndex(array('postal', 'city'), 'idx_ezpad_post_ci');
63
+			$table->addIndex(array('parentid'), 'idx_ezpad_pid');
64
+			$table->addIndex(array('city'), 'idx_ezpad_city');
65
+
66
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
67
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezpad_pid');
68 68
 
69 69
 			return $schema;
70 70
 		},
71 71
 
72
-		'ezuser_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
72
+		'ezuser_list_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
73 73
 
74
-			$table = $schema->createTable( 'ezuser_list_type' );
74
+			$table = $schema->createTable('ezuser_list_type');
75 75
 
76
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
77
-			$table->addColumn( 'siteid', 'integer', [] );
78
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
79
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
80
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
81
-			$table->addColumn( 'status', 'smallint', [] );
82
-			$table->addColumn( 'mtime', 'datetime', [] );
83
-			$table->addColumn( 'ctime', 'datetime', [] );
84
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
76
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
77
+			$table->addColumn('siteid', 'integer', []);
78
+			$table->addColumn('domain', 'string', array('length' => 32));
79
+			$table->addColumn('code', 'string', array('length' => 32));
80
+			$table->addColumn('label', 'string', array('length' => 255));
81
+			$table->addColumn('status', 'smallint', []);
82
+			$table->addColumn('mtime', 'datetime', []);
83
+			$table->addColumn('ctime', 'datetime', []);
84
+			$table->addColumn('editor', 'string', array('length' => 255));
85 85
 
86
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezplity_id' );
87
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_ezplity_sid_dom_code' );
88
-			$table->addIndex( array( 'siteid', 'status' ), 'idx_ezplity_sid_status' );
89
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_ezplity_sid_label' );
90
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_ezplity_sid_code' );
86
+			$table->setPrimaryKey(array('id'), 'pk_ezplity_id');
87
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_ezplity_sid_dom_code');
88
+			$table->addIndex(array('siteid', 'status'), 'idx_ezplity_sid_status');
89
+			$table->addIndex(array('siteid', 'label'), 'idx_ezplity_sid_label');
90
+			$table->addIndex(array('siteid', 'code'), 'idx_ezplity_sid_code');
91 91
 
92 92
 			return $schema;
93 93
 		},
94 94
 
95
-		'ezuser_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
96
-
97
-			$table = $schema->createTable( 'ezuser_list' );
98
-
99
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
100
-			$table->addColumn( 'parentid', 'integer', [] );
101
-			$table->addColumn( 'siteid', 'integer', [] );
102
-			$table->addColumn( 'typeid', 'integer', [] );
103
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
104
-			$table->addColumn( 'refid', 'string', array( 'length' => 32 ) );
105
-			$table->addColumn( 'start', 'datetime', array( 'notnull' => false ) );
106
-			$table->addColumn( 'end', 'datetime', array( 'notnull' => false ) );
107
-			$table->addColumn( 'config', 'text', array( 'length' => 0xffff ) );
108
-			$table->addColumn( 'pos', 'integer', [] );
109
-			$table->addColumn( 'status', 'smallint', [] );
110
-			$table->addColumn( 'mtime', 'datetime', [] );
111
-			$table->addColumn( 'ctime', 'datetime', [] );
112
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
113
-
114
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpli_id' );
115
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'refid', 'typeid', 'parentid' ), 'unq_ezpli_sid_dm_rid_tid_pid' );
116
-			$table->addIndex( array( 'siteid', 'status', 'start', 'end' ), 'idx_ezpli_sid_stat_start_end' );
117
-			$table->addIndex( array( 'parentid', 'siteid', 'refid', 'domain', 'typeid' ), 'idx_ezpli_pid_sid_rid_dom_tid' );
118
-			$table->addIndex( array( 'parentid', 'siteid', 'start' ), 'idx_ezpli_pid_sid_start' );
119
-			$table->addIndex( array( 'parentid', 'siteid', 'end' ), 'idx_ezpli_pid_sid_end' );
120
-			$table->addIndex( array( 'parentid', 'siteid', 'pos' ), 'idx_ezpli_pid_sid_pos' );
121
-
122
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
123
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezpli_pid' );
124
-
125
-			$table->addForeignKeyConstraint( 'ezuser_list_type', array( 'typeid' ), array( 'id' ),
126
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezpli_typeid' );
95
+		'ezuser_list' => function(\Doctrine\DBAL\Schema\Schema $schema) {
96
+
97
+			$table = $schema->createTable('ezuser_list');
98
+
99
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
100
+			$table->addColumn('parentid', 'integer', []);
101
+			$table->addColumn('siteid', 'integer', []);
102
+			$table->addColumn('typeid', 'integer', []);
103
+			$table->addColumn('domain', 'string', array('length' => 32));
104
+			$table->addColumn('refid', 'string', array('length' => 32));
105
+			$table->addColumn('start', 'datetime', array('notnull' => false));
106
+			$table->addColumn('end', 'datetime', array('notnull' => false));
107
+			$table->addColumn('config', 'text', array('length' => 0xffff));
108
+			$table->addColumn('pos', 'integer', []);
109
+			$table->addColumn('status', 'smallint', []);
110
+			$table->addColumn('mtime', 'datetime', []);
111
+			$table->addColumn('ctime', 'datetime', []);
112
+			$table->addColumn('editor', 'string', array('length' => 255));
113
+
114
+			$table->setPrimaryKey(array('id'), 'pk_ezpli_id');
115
+			$table->addUniqueIndex(array('siteid', 'domain', 'refid', 'typeid', 'parentid'), 'unq_ezpli_sid_dm_rid_tid_pid');
116
+			$table->addIndex(array('siteid', 'status', 'start', 'end'), 'idx_ezpli_sid_stat_start_end');
117
+			$table->addIndex(array('parentid', 'siteid', 'refid', 'domain', 'typeid'), 'idx_ezpli_pid_sid_rid_dom_tid');
118
+			$table->addIndex(array('parentid', 'siteid', 'start'), 'idx_ezpli_pid_sid_start');
119
+			$table->addIndex(array('parentid', 'siteid', 'end'), 'idx_ezpli_pid_sid_end');
120
+			$table->addIndex(array('parentid', 'siteid', 'pos'), 'idx_ezpli_pid_sid_pos');
121
+
122
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
123
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezpli_pid');
124
+
125
+			$table->addForeignKeyConstraint('ezuser_list_type', array('typeid'), array('id'),
126
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezpli_typeid');
127 127
 
128 128
 			return $schema;
129 129
 		},
130 130
 
131
-		'ezuser_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
131
+		'ezuser_property_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
132 132
 
133
-			$table = $schema->createTable( 'ezuser_property_type' );
133
+			$table = $schema->createTable('ezuser_property_type');
134 134
 
135
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
136
-			$table->addColumn( 'siteid', 'integer', [] );
137
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
138
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
139
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
140
-			$table->addColumn( 'pos', 'integer', [] );
141
-			$table->addColumn( 'status', 'smallint', [] );
142
-			$table->addColumn( 'mtime', 'datetime', [] );
143
-			$table->addColumn( 'ctime', 'datetime', [] );
144
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
135
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
136
+			$table->addColumn('siteid', 'integer', []);
137
+			$table->addColumn('domain', 'string', array('length' => 32));
138
+			$table->addColumn('code', 'string', array('length' => 32));
139
+			$table->addColumn('label', 'string', array('length' => 255));
140
+			$table->addColumn('pos', 'integer', []);
141
+			$table->addColumn('status', 'smallint', []);
142
+			$table->addColumn('mtime', 'datetime', []);
143
+			$table->addColumn('ctime', 'datetime', []);
144
+			$table->addColumn('editor', 'string', array('length' => 255));
145 145
 
146
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezpprty_id' );
147
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_ezpprty_sid_dom_code' );
148
-			$table->addIndex( array( 'siteid', 'status', 'pos' ), 'idx_ezpprty_sid_status_pos' );
149
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_ezpprty_sid_label' );
150
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_ezpprty_sid_code' );
146
+			$table->setPrimaryKey(array('id'), 'pk_ezpprty_id');
147
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_ezpprty_sid_dom_code');
148
+			$table->addIndex(array('siteid', 'status', 'pos'), 'idx_ezpprty_sid_status_pos');
149
+			$table->addIndex(array('siteid', 'label'), 'idx_ezpprty_sid_label');
150
+			$table->addIndex(array('siteid', 'code'), 'idx_ezpprty_sid_code');
151 151
 
152 152
 			return $schema;
153 153
 		},
154 154
 
155
-		'ezuser_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
155
+		'ezuser_property' => function(\Doctrine\DBAL\Schema\Schema $schema) {
156 156
 
157
-			$table = $schema->createTable( 'ezuser_property' );
157
+			$table = $schema->createTable('ezuser_property');
158 158
 
159
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
160
-			$table->addColumn( 'siteid', 'integer', [] );
161
-			$table->addColumn( 'parentid', 'integer', [] );
162
-			$table->addColumn( 'typeid', 'integer', [] );
163
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
164
-			$table->addColumn( 'value', 'string', array( 'length' => 255 ) );
165
-			$table->addColumn( 'mtime', 'datetime', [] );
166
-			$table->addColumn( 'ctime', 'datetime', [] );
167
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
159
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
160
+			$table->addColumn('siteid', 'integer', []);
161
+			$table->addColumn('parentid', 'integer', []);
162
+			$table->addColumn('typeid', 'integer', []);
163
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
164
+			$table->addColumn('value', 'string', array('length' => 255));
165
+			$table->addColumn('mtime', 'datetime', []);
166
+			$table->addColumn('ctime', 'datetime', []);
167
+			$table->addColumn('editor', 'string', array('length' => 255));
168 168
 
169
-			$table->setPrimaryKey( array( 'id' ), 'pk_ezppr_id' );
170
-			$table->addUniqueIndex( array( 'parentid', 'siteid', 'typeid', 'langid', 'value' ), 'unq_ezppr_sid_tid_lid_value' );
171
-			$table->addIndex( array( 'siteid', 'langid' ), 'idx_ezppr_sid_langid' );
172
-			$table->addIndex( array( 'siteid', 'value' ), 'idx_ezppr_sid_value' );
173
-			$table->addIndex( array( 'typeid' ), 'fk_ezppr_typeid' );
174
-			$table->addIndex( array( 'parentid' ), 'fk_ezppr_pid' );
169
+			$table->setPrimaryKey(array('id'), 'pk_ezppr_id');
170
+			$table->addUniqueIndex(array('parentid', 'siteid', 'typeid', 'langid', 'value'), 'unq_ezppr_sid_tid_lid_value');
171
+			$table->addIndex(array('siteid', 'langid'), 'idx_ezppr_sid_langid');
172
+			$table->addIndex(array('siteid', 'value'), 'idx_ezppr_sid_value');
173
+			$table->addIndex(array('typeid'), 'fk_ezppr_typeid');
174
+			$table->addIndex(array('parentid'), 'fk_ezppr_pid');
175 175
 
176
-			$table->addForeignKeyConstraint( 'ezuser', array( 'parentid' ), array( 'contentobject_id' ),
177
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezppr_pid' );
176
+			$table->addForeignKeyConstraint('ezuser', array('parentid'), array('contentobject_id'),
177
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezppr_pid');
178 178
 
179
-			$table->addForeignKeyConstraint( 'ezuser_property_type', array( 'typeid' ), array( 'id' ),
180
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_ezppr_typeid' );
179
+			$table->addForeignKeyConstraint('ezuser_property_type', array('typeid'), array('id'),
180
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_ezppr_typeid');
181 181
 
182 182
 			return $schema;
183 183
 		},
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Ezpublish.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		'customer.property.id' => array(
25 25
 			'code' => 'customer.property.id',
26 26
 			'internalcode' => 'ezppr."id"',
27
-			'internaldeps'=>array( 'LEFT JOIN "ezp_user_property" AS ezppr ON ( ezppr."parentid" = ezp."id" )' ),
27
+			'internaldeps'=>array('LEFT JOIN "ezp_user_property" AS ezppr ON ( ezppr."parentid" = ezp."id" )'),
28 28
 			'label' => 'Property ID',
29 29
 			'type' => 'integer',
30 30
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
102 102
 	 */
103
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
103
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
104 104
 	{
105
-		parent::__construct( $context );
106
-		$this->setResourceName( 'db-customer' );
105
+		parent::__construct($context);
106
+		$this->setResourceName('db-customer');
107 107
 	}
108 108
 
109 109
 
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 	 *
113 113
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
114 114
 	 */
115
-	public function cleanup( array $siteids )
115
+	public function cleanup(array $siteids)
116 116
 	{
117 117
 		$path = 'mshop/customer/manager/property/submanagers';
118
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
119
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
118
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
119
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
120 120
 		}
121 121
 
122
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/ezpublish/delete' );
122
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/ezpublish/delete');
123 123
 	}
124 124
 
125 125
 
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
 	 * @param boolean $withsub Return also the resource type of sub-managers if true
130 130
 	 * @return array Type of the manager and submanagers, subtypes are separated by slashes
131 131
 	 */
132
-	public function getResourceType( $withsub = true )
132
+	public function getResourceType($withsub = true)
133 133
 	{
134 134
 		$path = 'mshop/customer/manager/property/submanagers';
135 135
 
136
-		return $this->getResourceTypeBase( 'customer/property', $path, array( 'type' ), $withsub );
136
+		return $this->getResourceTypeBase('customer/property', $path, array('type'), $withsub);
137 137
 	}
138 138
 
139 139
 
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
 	 * @param boolean $withsub Return also attributes of sub-managers if true
144 144
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
145 145
 	 */
146
-	public function getSearchAttributes( $withsub = true )
146
+	public function getSearchAttributes($withsub = true)
147 147
 	{
148 148
 		$path = 'mshop/customer/manager/property/submanagers';
149 149
 
150
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, array( 'type' ), $withsub );
150
+		return $this->getSearchAttributesBase($this->searchConfig, $path, array('type'), $withsub);
151 151
 	}
152 152
 
153 153
 
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 	 * configuration (or Default) if null
160 160
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
161 161
 	 */
162
-	public function getSubManager( $manager, $name = null )
162
+	public function getSubManager($manager, $name = null)
163 163
 	{
164
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
164
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Ezpublish' : $name));
165 165
 	}
166 166
 
167 167
 
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Property/Type/Ezpublish.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		'customer.property.type.id' => array(
25 25
 			'code' => 'customer.property.type.id',
26 26
 			'internalcode' => 'ezpprty."id"',
27
-			'internaldeps' => array( 'LEFT JOIN "ezp_user_property_type" AS ezpprty ON ( ezppr."typeid" = ezpprty."id" )' ),
27
+			'internaldeps' => array('LEFT JOIN "ezp_user_property_type" AS ezpprty ON ( ezppr."typeid" = ezpprty."id" )'),
28 28
 			'label' => 'Property type ID',
29 29
 			'type' => 'integer',
30 30
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 	 *
106 106
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
107 107
 	 */
108
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
108
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
109 109
 	{
110
-		parent::__construct( $context );
111
-		$this->setResourceName( 'db-customer' );
110
+		parent::__construct($context);
111
+		$this->setResourceName('db-customer');
112 112
 	}
113 113
 
114 114
 
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 	 *
118 118
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
119 119
 	 */
120
-	public function cleanup( array $siteids )
120
+	public function cleanup(array $siteids)
121 121
 	{
122 122
 		$path = 'mshop/customer/manager/property/type/submanagers';
123
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
124
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
123
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
124
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
125 125
 		}
126 126
 
127
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/type/ezpublish/delete' );
127
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/type/ezpublish/delete');
128 128
 	}
129 129
 
130 130
 
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 	 * @param boolean $withsub Return also the resource type of sub-managers if true
135 135
 	 * @return array Type of the manager and submanagers, subtypes are separated by slashes
136 136
 	 */
137
-	public function getResourceType( $withsub = true )
137
+	public function getResourceType($withsub = true)
138 138
 	{
139 139
 		$path = 'mshop/customer/manager/property/type/submanagers';
140 140
 
141
-		return $this->getResourceTypeBase( 'customer/property/type', $path, [], $withsub );
141
+		return $this->getResourceTypeBase('customer/property/type', $path, [], $withsub);
142 142
 	}
143 143
 
144 144
 
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
 	 * @param boolean $withsub Return also attributes of sub-managers if true
149 149
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
150 150
 	 */
151
-	public function getSearchAttributes( $withsub = true )
151
+	public function getSearchAttributes($withsub = true)
152 152
 	{
153 153
 		$path = 'mshop/customer/manager/property/type/submanagers';
154 154
 
155
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
155
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
156 156
 	}
157 157
 
158 158
 
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
164 164
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g types, lists etc.
165 165
 	 */
166
-	public function getSubManager( $manager, $name = null )
166
+	public function getSubManager($manager, $name = null)
167 167
 	{
168
-		return $this->getSubManagerBase( 'customer', 'property/type/' . $manager, ( $name === null ? 'Ezpublish' : $name ) );
168
+		return $this->getSubManagerBase('customer', 'property/type/'.$manager, ($name === null ? 'Ezpublish' : $name));
169 169
 	}
170 170
 
171 171
 
Please login to merge, or discard this patch.