Completed
Pull Request — master (#25)
by
unknown
02:53
created
Controller/Common/Product/Import/Csv/Processor/Supplier/StandardTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 	protected function tearDown(): void
52 52
 	{
53
-		if( self::$supplier != null ){
53
+		if( self::$supplier != null ) {
54 54
 			$this->delete( self::$supplier );
55 55
 		}
56 56
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 		$suppliersCodes = ['job_csv_test', 'job_csv_test2'];
78 78
 
79
-		foreach( $suppliersCodes as $code ){
79
+		foreach( $suppliersCodes as $code ) {
80 80
 			$this->create( $code );
81 81
 		}
82 82
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		$suppliersCodes = ['job_csv_test', 'job_csv_test2'];
112 112
 
113
-		foreach( $suppliersCodes as $code ){
113
+		foreach( $suppliersCodes as $code ) {
114 114
 			$this->create( $code );
115 115
 		}
116 116
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			3 => 'job_csv_test',
245 245
 		);
246 246
 
247
-		$this->context->getConfig()->set( 'controller/common/product/import/csv/processor/supplier/listtypes', array('default') );
247
+		$this->context->getConfig()->set( 'controller/common/product/import/csv/processor/supplier/listtypes', array( 'default' ) );
248 248
 
249 249
 		self::$supplier = $this->create( 'job_csv_test' );
250 250
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 		$search = $manager->createSearch();
321 321
 		$search->setConditions( $search->compare( '==', 'supplier.code', $code ) );
322 322
 
323
-		if( ($item = $manager->searchItems( $search, ['product'] )->first()) === null ) {
323
+		if( ( $item = $manager->searchItems( $search, ['product'] )->first() ) === null ) {
324 324
 			throw new \RuntimeException( sprintf( 'No supplier item for code "%1$s"', $code ) );
325 325
 		}
326 326
 
Please login to merge, or discard this patch.
src/Controller/Common/Supplier/Import/Csv/Processor/Address/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 					continue;
68 68
 				}
69 69
 
70
-				if( ($item = $items->pop()) === null ) {
70
+				if( ( $item = $items->pop() ) === null ) {
71 71
 					$item = $manager->createItem();
72 72
 				}
73 73
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@  discard block
 block discarded – undo
58 58
 		$manager = \Aimeos\MShop::create( $this->getContext(), 'supplier/address' );
59 59
 		$manager->begin();
60 60
 
61
-		try {
61
+		try
62
+		{
62 63
 			$map = $this->getMappedChunk( $data, $this->getMapping() );
63 64
 			$items = $supplier->getAddressItems();
64 65
 
@@ -78,7 +79,9 @@  discard block
 block discarded – undo
78 79
 			$data = $this->getObject()->process( $supplier, $data );
79 80
 
80 81
 			$manager->commit();
81
-		} catch( \Exception $e ) {
82
+		}
83
+		catch( \Exception $e )
84
+		{
82 85
 			$manager->rollback();
83 86
 			throw $e;
84 87
 		}
Please login to merge, or discard this patch.