Passed
Pull Request — master (#25)
by
unknown
02:30
created
src/Controller/Common/Supplier/Import/Csv/Processor/Address/Standard.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 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
 					$item->fromArray( $list );
73 73
 					$supplier->addAddressItem( $item );
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			$data = $this->getObject()->process( $supplier, $data );
81 81
 
82 82
 			$manager->commit();
83
-		} catch ( \Exception $e ) {
83
+		} catch( \Exception $e ) {
84 84
 			$manager->rollback();
85 85
 			throw $e;
86 86
 		}
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 = $this->getAddressItems( $supplier->getId() );
64 65
 
@@ -80,7 +81,9 @@  discard block
 block discarded – undo
80 81
 			$data = $this->getObject()->process( $supplier, $data );
81 82
 
82 83
 			$manager->commit();
83
-		} catch ( \Exception $e ) {
84
+		}
85
+		catch ( \Exception $e )
86
+		{
84 87
 			$manager->rollback();
85 88
 			throw $e;
86 89
 		}
Please login to merge, or discard this patch.
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.