Completed
Push — master ( 815faa...197710 )
by Aimeos
07:55
created
lib/mshoplib/setup/unittest/ProductListAddTestData.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$this->additional->setEditor( 'core:unittest' );
62 62
 
63 63
 		$ds = DIRECTORY_SEPARATOR;
64
-		$path = __DIR__ . $ds . 'data' . $ds . 'product-list.php';
64
+		$path = __DIR__.$ds.'data'.$ds.'product-list.php';
65 65
 
66 66
 		if( ( $testdata = include( $path ) ) == false ) {
67 67
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for product domain', $path ) );
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$refIds = array();
136 136
 		foreach( $attributeManager->searchItems( $search ) as $item ) {
137
-			$refIds['attribute/' . $item->getDomain() . '/' . $item->getType() . '/' . $item->getCode()] = $item->getId();
137
+			$refIds['attribute/'.$item->getDomain().'/'.$item->getType().'/'.$item->getCode()] = $item->getId();
138 138
 		}
139 139
 
140 140
 		return $refIds;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
 		$refIds = array();
169 169
 		foreach( $mediaManager->searchItems( $search ) as $item ) {
170
-			$refIds['media/' . $item->getUrl()] = $item->getId();
170
+			$refIds['media/'.$item->getUrl()] = $item->getId();
171 171
 		}
172 172
 
173 173
 		return $refIds;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
 		$refIds = array();
225 225
 		foreach( $priceManager->searchItems( $search ) as $item ) {
226
-			$refIds['price/' . $item->getDomain() . '/' . $item->getType() . '/' . $item->getValue() . '/' . $item->getCosts()] = $item->getId();
226
+			$refIds['price/'.$item->getDomain().'/'.$item->getType().'/'.$item->getValue().'/'.$item->getCosts()] = $item->getId();
227 227
 		}
228 228
 
229 229
 		return $refIds;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$refIds = array();
257 257
 		foreach( $textManager->searchItems( $search ) as $item ) {
258
-			$refIds['text/' . $item->getLabel()] = $item->getId();
258
+			$refIds['text/'.$item->getLabel()] = $item->getId();
259 259
 		}
260 260
 
261 261
 		return $refIds;
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
 		$refIds = array();
292 292
 		foreach( $tagManager->searchItems( $search ) as $item ) {
293
-			$refIds['tag/' . $item->getLabel()] = $item->getId();
293
+			$refIds['tag/'.$item->getLabel()] = $item->getId();
294 294
 		}
295 295
 
296 296
 		return $refIds;
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		$search->setConditions( $search->compare( '==', 'product.code', array_unique( $parentCodes ) ) );
406 406
 
407 407
 		foreach( $manager->searchItems( $search ) as $item ) {
408
-			$parentIds['product/' . $item->getCode()] = $item->getId();
408
+			$parentIds['product/'.$item->getCode()] = $item->getId();
409 409
 		}
410 410
 
411 411
 		return $parentIds;
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 		$search->setConditions( $search->compare( '==', 'product.code', $codes ) );
437 437
 
438 438
 		foreach( $manager->searchItems( $search ) as $item ) {
439
-			$refIds['product/' . $item->getCode()] = $item->getId();
439
+			$refIds['product/'.$item->getCode()] = $item->getId();
440 440
 		}
441 441
 
442 442
 		return $refIds;
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/TextAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'text.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'text.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for text domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/SupplierListAddTestData.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 		$this->additional->setEditor( 'core:unittest' );
60 60
 
61 61
 		$ds = DIRECTORY_SEPARATOR;
62
-		$path = __DIR__ . $ds . 'data' . $ds . 'supplier-list.php';
62
+		$path = __DIR__.$ds.'data'.$ds.'supplier-list.php';
63 63
 
64
-		if( ( $testdata = include( $path ) ) == false ){
64
+		if( ( $testdata = include( $path ) ) == false ) {
65 65
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for supplier list domain', $path ) );
66 66
 		}
67 67
 
68 68
 		$refKeys = array();
69 69
 		foreach( $testdata['supplier/lists'] as $dataset ) {
70
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
70
+			$refKeys[$dataset['domain']][] = $dataset['refid'];
71 71
 		}
72 72
 
73 73
 		$refIds = array();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		$codes = array();
93 93
 		foreach( $keys as $dataset )
94 94
 		{
95
-			if( ( $pos = strpos( $dataset, '/' ) ) === false || ( $str = substr( $dataset, $pos+1 ) ) === false ) {
95
+			if( ( $pos = strpos( $dataset, '/' ) ) === false || ( $str = substr( $dataset, $pos + 1 ) ) === false ) {
96 96
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'Some keys for ref products are set wrong "%1$s"', $dataset ) );
97 97
 			}
98 98
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 		$refIds = array();
106 106
 		foreach( $manager->searchItems( $search ) as $item ) {
107
-			$refIds[ 'product/' . $item->getCode() ] = $item->getId();
107
+			$refIds['product/'.$item->getCode()] = $item->getId();
108 108
 		}
109 109
 
110 110
 		return $refIds;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		$labels = array();
125 125
 		foreach( $keys as $dataset )
126 126
 		{
127
-			if( ( $pos = strpos( $dataset, '/' ) ) === false || ( $str = substr( $dataset, $pos+1 ) ) === false ) {
127
+			if( ( $pos = strpos( $dataset, '/' ) ) === false || ( $str = substr( $dataset, $pos + 1 ) ) === false ) {
128 128
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'Some keys for ref text are set wrong "%1$s"', $dataset ) );
129 129
 			}
130 130
 
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 		$search->setConditions( $search->compare( '==', 'text.label', $labels ) );
136 136
 
137 137
 		$refIds = array();
138
-		foreach( $textManager->searchItems( $search ) as $item )	{
139
-			$refIds[ 'text/'.$item->getLabel() ] = $item->getId();
138
+		foreach( $textManager->searchItems( $search ) as $item ) {
139
+			$refIds['text/'.$item->getLabel()] = $item->getId();
140 140
 		}
141 141
 
142 142
 		return $refIds;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		$itemCode = array();
161 161
 		foreach( $testdata['supplier/lists'] as $dataset )
162 162
 		{
163
-			if( ( $pos = strpos( $dataset['parentid'], '/' ) ) === false || ( $str = substr( $dataset['parentid'], $pos+1 ) ) === false ) {
163
+			if( ( $pos = strpos( $dataset['parentid'], '/' ) ) === false || ( $str = substr( $dataset['parentid'], $pos + 1 ) ) === false ) {
164 164
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'Some keys for parentid are set wrong "%1$s"', $dataset['parentid'] ) );
165 165
 			}
166 166
 
@@ -168,11 +168,11 @@  discard block
 block discarded – undo
168 168
 		}
169 169
 
170 170
 		$search = $supplierManager->createSearch();
171
-		$search->setConditions( $search->compare( '==', 'supplier.code', $itemCode) );
171
+		$search->setConditions( $search->compare( '==', 'supplier.code', $itemCode ) );
172 172
 
173 173
 		$parentIds = array();
174
-		foreach( $supplierManager->searchItems( $search ) as $item )	{
175
-			$parentIds[ 'supplier/'.$item->getCode() ] = $item->getId();
174
+		foreach( $supplierManager->searchItems( $search ) as $item ) {
175
+			$parentIds['supplier/'.$item->getCode()] = $item->getId();
176 176
 		}
177 177
 
178 178
 		$listItemTypeIds = array();
@@ -189,28 +189,28 @@  discard block
 block discarded – undo
189 189
 			$listItemType->setStatus( $dataset['status'] );
190 190
 
191 191
 			$supplierListTypeManager->saveItem( $listItemType );
192
-			$listItemTypeIds[ $key ] = $listItemType->getId();
192
+			$listItemTypeIds[$key] = $listItemType->getId();
193 193
 		}
194 194
 
195 195
 		$listItem = $supplierListManager->createItem();
196 196
 		foreach( $testdata['supplier/lists'] as $dataset )
197 197
 		{
198
-			if( !isset( $parentIds[ $dataset['parentid'] ] ) ) {
198
+			if( !isset( $parentIds[$dataset['parentid']] ) ) {
199 199
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No supplier ID found for "%1$s"', $dataset['parentid'] ) );
200 200
 			}
201 201
 
202
-			if( !isset( $refIds[ $dataset['domain'] ][ $dataset['refid'] ] ) ) {
202
+			if( !isset( $refIds[$dataset['domain']][$dataset['refid']] ) ) {
203 203
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No "%2$s" ref ID found for "%1$s"', $dataset['refid'], $dataset['domain'] ) );
204 204
 			}
205 205
 
206
-			if( !isset( $listItemTypeIds[ $dataset['typeid'] ] ) ) {
206
+			if( !isset( $listItemTypeIds[$dataset['typeid']] ) ) {
207 207
 				throw new \Aimeos\MW\Setup\Exception( sprintf( 'No supplier list type ID found for "%1$s"', $dataset['typeid'] ) );
208 208
 			}
209 209
 
210 210
 			$listItem->setId( null );
211
-			$listItem->setParentId( $parentIds[ $dataset['parentid'] ] );
212
-			$listItem->setTypeId( $listItemTypeIds[ $dataset['typeid'] ] );
213
-			$listItem->setRefId( $refIds[ $dataset['domain'] ] [ $dataset['refid'] ] );
211
+			$listItem->setParentId( $parentIds[$dataset['parentid']] );
212
+			$listItem->setTypeId( $listItemTypeIds[$dataset['typeid']] );
213
+			$listItem->setRefId( $refIds[$dataset['domain']] [$dataset['refid']] );
214 214
 			$listItem->setDomain( $dataset['domain'] );
215 215
 			$listItem->setDateStart( $dataset['start'] );
216 216
 			$listItem->setDateEnd( $dataset['end'] );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/MediaAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'media.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'media.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for media domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/LogAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 		$adminLogManager = \Aimeos\MAdmin\Log\Manager\Factory::createManager( $this->additional, 'Standard' );
76 76
 
77 77
 		$ds = DIRECTORY_SEPARATOR;
78
-		$path = __DIR__ . $ds . 'data' . $ds . 'log.php';
78
+		$path = __DIR__.$ds.'data'.$ds.'log.php';
79 79
 
80 80
 		if( ( $testdata = include( $path ) ) == false ) {
81 81
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for log domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/CatalogAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'catalog.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'catalog.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for catalog domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/PluginAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 		$pluginTypeManager = $pluginManager->getSubManager( 'type', 'Standard' );
77 77
 
78 78
 		$ds = DIRECTORY_SEPARATOR;
79
-		$path = __DIR__ . $ds . 'data' . $ds . 'plugin.php';
79
+		$path = __DIR__.$ds.'data'.$ds.'plugin.php';
80 80
 
81 81
 		if( ( $testdata = include( $path ) ) == false ) {
82 82
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for plugin domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/TagAddTestData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 		$this->additional->setEditor( 'core:unittest' );
62 62
 
63 63
 		$ds = DIRECTORY_SEPARATOR;
64
-		$path = __DIR__ . $ds . 'data' . $ds . 'tag.php';
64
+		$path = __DIR__.$ds.'data'.$ds.'tag.php';
65 65
 
66 66
 		if( ( $testdata = include( $path ) ) == false ) {
67 67
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for tag domain', $path ) );
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/MediaListAddTestData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		$this->additional->setEditor( 'core:unittest' );
61 61
 
62 62
 		$ds = DIRECTORY_SEPARATOR;
63
-		$path = __DIR__ . $ds . 'data' . $ds . 'media-list.php';
63
+		$path = __DIR__.$ds.'data'.$ds.'media-list.php';
64 64
 
65 65
 		if( ( $testdata = include( $path ) ) == false ) {
66 66
 			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for media list domain', $path ) );
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 		$refIds = array();
131 131
 		foreach( $attributeManager->searchItems( $search ) as $item ) {
132
-			$refIds['attribute/' . $item->getDomain() . '/' . $item->getType() . '/' . $item->getCode()] = $item->getId();
132
+			$refIds['attribute/'.$item->getDomain().'/'.$item->getType().'/'.$item->getCode()] = $item->getId();
133 133
 		}
134 134
 
135 135
 		return $refIds;
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
 		$refIds = array();
163 163
 		foreach( $textManager->searchItems( $search ) as $item ) {
164
-			$refIds['text/' . $item->getLabel()] = $item->getId();
164
+			$refIds['text/'.$item->getLabel()] = $item->getId();
165 165
 		}
166 166
 
167 167
 		return $refIds;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
 		$parentIds = array();
200 200
 		foreach( $result as $item ) {
201
-			$parentIds['media/' . $item->getUrl()] = $item->getId();
201
+			$parentIds['media/'.$item->getUrl()] = $item->getId();
202 202
 		}
203 203
 
204 204
 		$medListTypes = array();
Please login to merge, or discard this patch.