Completed
Push — master ( 1fc904...dc433d )
by Aimeos
07:56
created
lib/mshoplib/setup/unitperf/CatalogAddBasePerfData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 		for( $i = 1; $i <= 5; $i++ )
59 59
 		{
60 60
 			$catalogOneItem = $catalogManager->createItem();
61
-			$catalogOneItem->setCode( 'cat-' . $i );
62
-			$catalogOneItem->setLabel( 'cat-' . $i );
61
+			$catalogOneItem->setCode( 'cat-'.$i );
62
+			$catalogOneItem->setLabel( 'cat-'.$i );
63 63
 			$catalogOneItem->setStatus( 1 );
64 64
 
65 65
 			$catalogManager->insertItem( $catalogOneItem, $catalogRootItem->getId() );
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 			for( $j = 1; $j <= 10; $j++ )
68 68
 			{
69 69
 				$catalogTwoItem = $catalogManager->createItem();
70
-				$catalogTwoItem->setCode( 'cat-' . $i . ':' . $j );
71
-				$catalogTwoItem->setLabel( 'cat-' . $i . ':' . $j );
70
+				$catalogTwoItem->setCode( 'cat-'.$i.':'.$j );
71
+				$catalogTwoItem->setLabel( 'cat-'.$i.':'.$j );
72 72
 				$catalogTwoItem->setStatus( 1 );
73 73
 
74 74
 				$catalogManager->insertItem( $catalogTwoItem, $catalogOneItem->getId() );
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 				for( $k = 1; $k <= 10; $k++ )
77 77
 				{
78 78
 					$catalogThreeItem = $catalogManager->createItem();
79
-					$catalogThreeItem->setCode( 'cat-' . $i . ':' . $j . ':' . $k );
80
-					$catalogThreeItem->setLabel( 'cat-' . $i . ':' . $j . ':' . $k );
79
+					$catalogThreeItem->setCode( 'cat-'.$i.':'.$j.':'.$k );
80
+					$catalogThreeItem->setLabel( 'cat-'.$i.':'.$j.':'.$k );
81 81
 					$catalogThreeItem->setStatus( 1 );
82 82
 
83 83
 					$catalogManager->insertItem( $catalogThreeItem, $catalogTwoItem->getId() );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unitperf/ServiceAddBasePerfData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 
90 90
 		for( $i = 0; $i < 100; $i++ )
91 91
 		{
92
-			$code = 'perf-' . str_pad( $i, 3, '0', STR_PAD_LEFT );
92
+			$code = 'perf-'.str_pad( $i, 3, '0', STR_PAD_LEFT );
93 93
 
94 94
 			$item->setId( null );
95 95
 			$item->setCode( $code );
96
-			$item->setLabel( 'Payment service ' . $code );
96
+			$item->setLabel( 'Payment service '.$code );
97 97
 			$item->setPosition( $i );
98 98
 
99 99
 			$manager->saveItem( $item, false );
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
 
124 124
 		for( $i = 0; $i < 100; $i++ )
125 125
 		{
126
-			$code = 'perf-' . str_pad( $i, 3, '0', STR_PAD_LEFT );
126
+			$code = 'perf-'.str_pad( $i, 3, '0', STR_PAD_LEFT );
127 127
 
128 128
 			$item->setId( null );
129 129
 			$item->setCode( $code );
130
-			$item->setLabel( 'Delivery service ' . $code );
130
+			$item->setLabel( 'Delivery service '.$code );
131 131
 			$item->setPosition( $i );
132 132
 
133 133
 			$manager->saveItem( $item, false );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unitperf/LocaleAddPerfData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 		if( $this->additional->getConfig()->get( 'setup/site' ) === 'unitperf' )
69 69
 		{
70 70
 			$ds = DIRECTORY_SEPARATOR;
71
-			$filename = __DIR__ . $ds . 'data' . $ds . 'locale.php';
71
+			$filename = __DIR__.$ds.'data'.$ds.'locale.php';
72 72
 
73 73
 			if( ( $testdata = include( $filename ) ) == false ) {
74 74
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unitperf/CustomerAddBasePerfData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		$customerItem = $customerManager->createItem();
52 52
 		$customerItem->setCode( 'demo-test' );
53 53
 		$customerItem->setLabel( 'Test demo unitperf user' );
54
-		$customerItem->setPassword( sha1( microtime( true ) . getmypid() . rand() ) );
54
+		$customerItem->setPassword( sha1( microtime( true ).getmypid().rand() ) );
55 55
 		$customerItem->setStatus( 1 );
56 56
 
57 57
 		$addrItem = $customerItem->getPaymentAddress();
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddCodeData.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$this->msg( sprintf( 'Adding default code data for site "%1$s"', $site ), 0 ); $this->status( '' );
62 62
 
63 63
 		$ds = DIRECTORY_SEPARATOR;
64
-		$path = __DIR__ . $ds . 'default' . $ds . 'data' . $ds . 'code.php';
64
+		$path = __DIR__.$ds.'default'.$ds.'data'.$ds.'code.php';
65 65
 
66 66
 		if( ( $data = include( $path ) ) == false ) {
67 67
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for default codes', $path ) );
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 				} catch( \Exception $e ) {; } // if type was already available
94 94
 			}
95 95
 
96
-			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
96
+			$this->status( $num > 0 ? $num.'/'.$total : 'OK' );
97 97
 		}
98 98
 	}
99 99
 }
100 100
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,10 +86,14 @@
 block discarded – undo
86 86
 					$type->setStatus( $dataset['status'] );
87 87
 				}
88 88
 
89
-				try {
89
+				try
90
+				{
90 91
 					$domainManager->saveItem( $type );
91 92
 					$num++;
92
-				} catch( \Exception $e ) {; } // if type was already available
93
+				}
94
+				catch( \Exception $e )
95
+				{
96
+; } // if type was already available
93 97
 			}
94 98
 
95 99
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddDataAbstract.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	{
69 69
 		$context = $this->getContext();
70 70
 		$attrManager = \Aimeos\MShop\Factory::createManager( $context, 'attribute' );
71
-		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain . '/lists' );
71
+		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain.'/lists' );
72 72
 
73 73
 
74 74
 		$item = $attrManager->createItem();
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 			$attrManager->saveItem( $item );
92 92
 
93 93
 			$listItem->setId( null );
94
-			$listItem->setTypeId( $this->getTypeId( $domain . '/lists/type', 'attribute', $entry['list-type'] ) );
94
+			$listItem->setTypeId( $this->getTypeId( $domain.'/lists/type', 'attribute', $entry['list-type'] ) );
95 95
 			$listItem->setDateStart( $entry['list-start'] );
96 96
 			$listItem->setDateEnd( $entry['list-end'] );
97 97
 			$listItem->setConfig( $entry['list-config'] );
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	{
133 133
 		$context = $this->getContext();
134 134
 		$mediaManager = \Aimeos\MShop\Factory::createManager( $context, 'media' );
135
-		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain . '/lists' );
135
+		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain.'/lists' );
136 136
 
137 137
 
138 138
 		$item = $mediaManager->createItem();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			$mediaManager->saveItem( $item );
158 158
 
159 159
 			$listItem->setId( null );
160
-			$listItem->setTypeId( $this->getTypeId( $domain . '/lists/type', 'media', $entry['list-type'] ) );
160
+			$listItem->setTypeId( $this->getTypeId( $domain.'/lists/type', 'media', $entry['list-type'] ) );
161 161
 			$listItem->setDateStart( $entry['list-start'] );
162 162
 			$listItem->setDateEnd( $entry['list-end'] );
163 163
 			$listItem->setConfig( $entry['list-config'] );
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	{
199 199
 		$context = $this->getContext();
200 200
 		$mediaManager = \Aimeos\MShop\Factory::createManager( $context, 'price' );
201
-		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain . '/lists' );
201
+		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain.'/lists' );
202 202
 
203 203
 
204 204
 		$item = $mediaManager->createItem();
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			$mediaManager->saveItem( $item );
226 226
 
227 227
 			$listItem->setId( null );
228
-			$listItem->setTypeId( $this->getTypeId( $domain . '/lists/type', 'price', $entry['list-type'] ) );
228
+			$listItem->setTypeId( $this->getTypeId( $domain.'/lists/type', 'price', $entry['list-type'] ) );
229 229
 			$listItem->setDateStart( $entry['list-start'] );
230 230
 			$listItem->setDateEnd( $entry['list-end'] );
231 231
 			$listItem->setConfig( $entry['list-config'] );
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 	{
267 267
 		$context = $this->getContext();
268 268
 		$textManager = \Aimeos\MShop\Factory::createManager( $context, 'text' );
269
-		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain . '/lists' );
269
+		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain.'/lists' );
270 270
 
271 271
 
272 272
 		$item = $textManager->createItem();
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 			$textManager->saveItem( $item );
290 290
 
291 291
 			$listItem->setId( null );
292
-			$listItem->setTypeId( $this->getTypeId( $domain . '/lists/type', 'text', $entry['list-type'] ) );
292
+			$listItem->setTypeId( $this->getTypeId( $domain.'/lists/type', 'text', $entry['list-type'] ) );
293 293
 			$listItem->setDateStart( $entry['list-start'] );
294 294
 			$listItem->setDateEnd( $entry['list-end'] );
295 295
 			$listItem->setConfig( $entry['list-config'] );
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	{
331 331
 		$context = $this->getContext();
332 332
 		$productManager = \Aimeos\MShop\Factory::createManager( $context, 'product' );
333
-		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain . '/lists' );
333
+		$listManager = \Aimeos\MShop\Factory::createManager( $context, $domain.'/lists' );
334 334
 
335 335
 
336 336
 		$listItem = $listManager->createItem();
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 			}
361 361
 
362 362
 			$listItem->setId( null );
363
-			$listItem->setTypeId( $this->getTypeId( $domain . '/lists/type', 'product', $entry['list-type'] ) );
363
+			$listItem->setTypeId( $this->getTypeId( $domain.'/lists/type', 'product', $entry['list-type'] ) );
364 364
 			$listItem->setDateStart( $entry['list-start'] );
365 365
 			$listItem->setDateEnd( $entry['list-end'] );
366 366
 			$listItem->setConfig( $entry['list-config'] );
@@ -430,8 +430,8 @@  discard block
 block discarded – undo
430 430
 
431 431
 		$search = $manager->createSearch();
432 432
 		$expr = array(
433
-			$search->compare( '==', $key . '.domain', $domain ),
434
-			$search->compare( '==', $key . '.code', $type ),
433
+			$search->compare( '==', $key.'.domain', $domain ),
434
+			$search->compare( '==', $key.'.code', $type ),
435 435
 		);
436 436
 		$search->setConditions( $search->combine( '&&', $expr ) );
437 437
 
@@ -464,8 +464,8 @@  discard block
 block discarded – undo
464 464
 
465 465
 		$search = $manager->createSearch();
466 466
 		$expr = array(
467
-			$search->compare( '==', $refdomain . '.domain', $domain ),
468
-			$search->compare( '=~', $refdomain . '.label', 'Demo' ),
467
+			$search->compare( '==', $refdomain.'.domain', $domain ),
468
+			$search->compare( '=~', $refdomain.'.label', 'Demo' ),
469 469
 		);
470 470
 		$search->setConditions( $search->combine( '&&', $expr ) );
471 471
 
@@ -475,9 +475,9 @@  discard block
 block discarded – undo
475 475
 
476 476
 		$search = $listManager->createSearch();
477 477
 		$expr = array(
478
-			$search->compare( '==', $key . '.parentid', $parentid ),
479
-			$search->compare( '==', $key . '.domain', $refdomain ),
480
-			$search->compare( '==', $key . '.refid', $ids ),
478
+			$search->compare( '==', $key.'.parentid', $parentid ),
479
+			$search->compare( '==', $key.'.domain', $refdomain ),
480
+			$search->compare( '==', $key.'.refid', $ids ),
481 481
 		);
482 482
 		$search->setConditions( $search->combine( '&&', $expr ) );
483 483
 
@@ -505,8 +505,8 @@  discard block
 block discarded – undo
505 505
 
506 506
 		$search = $listManager->createSearch();
507 507
 		$expr = array(
508
-			$search->compare( '==', $key . '.parentid', $parentid ),
509
-			$search->compare( '==', $key . '.domain', $refdomain ),
508
+			$search->compare( '==', $key.'.parentid', $parentid ),
509
+			$search->compare( '==', $key.'.domain', $refdomain ),
510 510
 		);
511 511
 		$search->setConditions( $search->combine( '&&', $expr ) );
512 512
 
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 
524 524
 
525 525
 			$search = $manager->createSearch();
526
-			$search->setConditions( $search->compare( '==', $refdomain . '.id', $refIds ) );
526
+			$search->setConditions( $search->compare( '==', $refdomain.'.id', $refIds ) );
527 527
 			$ids = array_keys( $manager->searchItems( $search ) );
528 528
 
529 529
 			foreach( array_diff( $refIds, $ids ) as $refId ) {
@@ -541,14 +541,14 @@  discard block
 block discarded – undo
541 541
 
542 542
 
543 543
 		$search = $manager->createSearch();
544
-		$search->setConditions( $search->compare( '=~', $refdomain . '.label', 'Demo' ) );
544
+		$search->setConditions( $search->compare( '=~', $refdomain.'.label', 'Demo' ) );
545 545
 		$ids = array_keys( $manager->searchItems( $search ) );
546 546
 
547 547
 		$search = $listManager->createSearch();
548 548
 		$expr = array(
549
-			$search->compare( '==', $key . '.parentid', $parentid ),
550
-			$search->compare( '==', $key . '.refid', $ids ),
551
-			$search->compare( '==', $key . '.domain', $refdomain ),
549
+			$search->compare( '==', $key.'.parentid', $parentid ),
550
+			$search->compare( '==', $key.'.refid', $ids ),
551
+			$search->compare( '==', $key.'.domain', $refdomain ),
552 552
 		);
553 553
 		$search->setConditions( $search->combine( '&&', $expr ) );
554 554
 
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddCatalogData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 		if( $value === '1' )
82 82
 		{
83 83
 			$ds = DIRECTORY_SEPARATOR;
84
-			$path = __DIR__ . $ds . 'data' . $ds . 'demo-catalog.php';
84
+			$path = __DIR__.$ds.'data'.$ds.'demo-catalog.php';
85 85
 
86 86
 			if( ( $data = include( $path ) ) == false ) {
87 87
 				throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for catalog domain', $path ) );
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
 			$this->removeItems( $item->getId(), 'catalog/lists', 'catalog', 'text' );
67 67
 			$this->removeListItems( $item->getId(), 'catalog/lists', 'product' );
68 68
 		}
69
-		catch( \Exception $e ) {; } // If no root node was already inserted into the database
69
+		catch( \Exception $e )
70
+		{
71
+; } // If no root node was already inserted into the database
70 72
 
71 73
 
72 74
 		if( $value === '1' )
@@ -103,8 +105,7 @@  discard block
 block discarded – undo
103 105
 			}
104 106
 
105 107
 			$this->status( 'added' );
106
-		}
107
-		else
108
+		} else
108 109
 		{
109 110
 			$this->status( 'removed' );
110 111
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/MShopAddLocaleDataDefault.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 		if( $this->additional->getConfig()->get( 'setup/site', 'default' ) === 'default' )
68 68
 		{
69 69
 			$ds = DIRECTORY_SEPARATOR;
70
-			$filename = __DIR__ . $ds . 'data' . $ds . 'locale.php';
70
+			$filename = __DIR__.$ds.'data'.$ds.'locale.php';
71 71
 
72 72
 			if( ( $data = include( $filename ) ) == false ) {
73 73
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddServiceData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 		if( $value === '1' )
83 83
 		{
84 84
 			$ds = DIRECTORY_SEPARATOR;
85
-			$path = __DIR__ . $ds . 'data' . $ds . 'demo-service.php';
85
+			$path = __DIR__.$ds.'data'.$ds.'demo-service.php';
86 86
 
87 87
 			if( ( $data = include( $path ) ) == false ) {
88 88
 				throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for service domain', $path ) );
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 			}
90 90
 
91 91
 			$this->status( 'added' );
92
-		}
93
-		else
92
+		} else
94 93
 		{
95 94
 			$this->status( 'removed' );
96 95
 		}
Please login to merge, or discard this patch.