Completed
Branch master (c3c77b)
by Aimeos
03:13
created
controller/jobs/src/Controller/Jobs/Order/Export/Csv/Base.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		{
153 153
 			if( ctype_alnum( $type ) === false )
154 154
 			{
155
-				$classname = is_string($type) ? '\\Aimeos\\Controller\\Common\\Order\\Export\\Csv\\Processor\\' . $type : '<not a string>';
155
+				$classname = is_string( $type ) ? '\\Aimeos\\Controller\\Common\\Order\\Export\\Csv\\Processor\\' . $type : '<not a string>';
156 156
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
157 157
 			}
158 158
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 			if( ctype_alnum( $name ) === false )
162 162
 			{
163
-				$classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Order\\Export\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
163
+				$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Order\\Export\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
164 164
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
165 165
 			}
166 166
 
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Product/Export/Sitemap/Factory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
 		 * @since 2015.01
65 65
 		 * @category Developer
66 66
 		 */
67
-		if ( $name === null ) {
68
-			$name = $context->getConfig()->get('controller/jobs/product/export/sitemap/name', 'Standard');
67
+		if( $name === null ) {
68
+			$name = $context->getConfig()->get( 'controller/jobs/product/export/sitemap/name', 'Standard' );
69 69
 		}
70 70
 
71
-		if ( ctype_alnum($name) === false )
71
+		if( ctype_alnum( $name ) === false )
72 72
 		{
73
-			$classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Product\\Export\\Sitemap\\' . $name : '<not a string>';
73
+			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Product\\Export\\Sitemap\\' . $name : '<not a string>';
74 74
 			throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Product/Export/Factory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
 		 * @since 2015.01
65 65
 		 * @category Developer
66 66
 		 */
67
-		if ( $name === null ) {
68
-			$name = $context->getConfig()->get('controller/jobs/product/export/name', 'Standard');
67
+		if( $name === null ) {
68
+			$name = $context->getConfig()->get( 'controller/jobs/product/export/name', 'Standard' );
69 69
 		}
70 70
 
71
-		if ( ctype_alnum($name) === false )
71
+		if( ctype_alnum( $name ) === false )
72 72
 		{
73
-			$classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Product\\Export\\' . $name : '<not a string>';
73
+			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Product\\Export\\' . $name : '<not a string>';
74 74
 			throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
controller/jobs/src/Controller/Jobs/Product/Import/Csv/Factory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
 		 * @since 2015.01
65 65
 		 * @category Developer
66 66
 		 */
67
-		if ( $name === null ) {
68
-			$name = $context->getConfig()->get('controller/jobs/product/import/csv/name', 'Standard');
67
+		if( $name === null ) {
68
+			$name = $context->getConfig()->get( 'controller/jobs/product/import/csv/name', 'Standard' );
69 69
 		}
70 70
 
71
-		if ( ctype_alnum($name) === false )
71
+		if( ctype_alnum( $name ) === false )
72 72
 		{
73
-			$classname = is_string($name) ? '\\Aimeos\\Controller\\Jobs\\Product\\Import\\Csv\\' . $name : '<not a string>';
73
+			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Product\\Import\\Csv\\' . $name : '<not a string>';
74 74
 			throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
75 75
 		}
76 76
 
Please login to merge, or discard this patch.
Controller/Common/Subscription/Process/Processor/Cgroup/StandardTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$context->getConfig()->set( 'controller/common/subscription/process/processor/cgroup/groupids', ['1', '2'] );
30 30
 
31
-		$fcn = function( $subject ){
31
+		$fcn = function( $subject ) {
32 32
 			return $subject->getGroups() === ['1', '2'];
33 33
 		};
34 34
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		$context->getConfig()->set( 'controller/common/subscription/process/processor/cgroup/groupids', ['1', '2'] );
60 60
 
61
-		$fcn = function( $subject ){
61
+		$fcn = function( $subject ) {
62 62
 			return $subject->getGroups() === [];
63 63
 		};
64 64
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$context->getConfig()->set( 'controller/common/subscription/process/processor/cgroup/groupids', ['1', '2'] );
30 30
 
31
-		$fcn = function( $subject ){
31
+		$fcn = function( $subject )
32
+		{
32 33
 			return $subject->getGroups() === ['1', '2'];
33 34
 		};
34 35
 
@@ -58,7 +59,8 @@  discard block
 block discarded – undo
58 59
 
59 60
 		$context->getConfig()->set( 'controller/common/subscription/process/processor/cgroup/groupids', ['1', '2'] );
60 61
 
61
-		$fcn = function( $subject ){
62
+		$fcn = function( $subject )
63
+		{
62 64
 			return $subject->getGroups() === [];
63 65
 		};
64 66
 
Please login to merge, or discard this patch.
Controller/Common/Product/Import/Csv/Processor/Catalog/StandardTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 		$manager = \Aimeos\MShop\Catalog\Manager\Factory::create( $this->context );
291 291
 		$listManager = $manager->getSubManager( 'lists' );
292 292
 
293
-		foreach( $catItem->getListItems('product') as $listItem ) {
293
+		foreach( $catItem->getListItems( 'product' ) as $listItem ) {
294 294
 			$listManager->deleteItem( $listItem->getId() );
295 295
 		}
296 296
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		$search = $manager->createSearch();
309 309
 		$search->setConditions( $search->compare( '==', 'catalog.code', $code ) );
310 310
 
311
-		$result = $manager->searchItems( $search, array('product') );
311
+		$result = $manager->searchItems( $search, array( 'product' ) );
312 312
 
313 313
 		if( ( $item = reset( $result ) ) === false ) {
314 314
 			throw new \RuntimeException( sprintf( 'No catalog item for code "%1$s"', $code ) );
Please login to merge, or discard this patch.
controller/common/src/Controller/Common/Coupon/Import/Csv/Base.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		$search->setSlice( 0, count( $codes ) );
37 37
 
38 38
 		foreach( $manager->searchItems( $search ) as $item ) {
39
-			$result[ $item->getCode() ] = $item;
39
+			$result[$item->getCode()] = $item;
40 40
 		}
41 41
 
42 42
 		return $result;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		while( $content->valid() && $count++ < $maxcnt )
60 60
 		{
61 61
 			$row = $content->current();
62
-			$data[ $row[$codePos] ] = $row;
62
+			$data[$row[$codePos]] = $row;
63 63
 			$content->next();
64 64
 		}
65 65
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		{
137 137
 			if( ctype_alnum( $type ) === false )
138 138
 			{
139
-				$classname = is_string($type) ? '\\Aimeos\\Controller\\Common\\Coupon\\Import\\Csv\\Processor\\' . $type : '<not a string>';
139
+				$classname = is_string( $type ) ? '\\Aimeos\\Controller\\Common\\Coupon\\Import\\Csv\\Processor\\' . $type : '<not a string>';
140 140
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
141 141
 			}
142 142
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 			if( ctype_alnum( $name ) === false )
146 146
 			{
147
-				$classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Coupon\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
147
+				$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Coupon\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
148 148
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
149 149
 			}
150 150
 
Please login to merge, or discard this patch.
controller/common/src/Controller/Common/Catalog/Import/Csv/Base.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 		if( ctype_alnum( $type ) === false )
59 59
 		{
60
-			$classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Cache\\' . $type : '<not a string>';
60
+			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Cache\\' . $type : '<not a string>';
61 61
 			throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
62 62
 		}
63 63
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 		if( ctype_alnum( $name ) === false )
69 69
 		{
70
-			$classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Cache\\' . $type . '\\' . $name : '<not a string>';
70
+			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Cache\\' . $type . '\\' . $name : '<not a string>';
71 71
 			throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72 72
 		}
73 73
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		while( $content->valid() && $count++ < $maxcnt )
120 120
 		{
121 121
 			$row = $content->current();
122
-			$data[ $row[$codePos] ] = $row;
122
+			$data[$row[$codePos]] = $row;
123 123
 			$content->next();
124 124
 		}
125 125
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 		{
214 214
 			if( ctype_alnum( $type ) === false )
215 215
 			{
216
-				$classname = is_string($type) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\' . $type : '<not a string>';
216
+				$classname = is_string( $type ) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\' . $type : '<not a string>';
217 217
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
218 218
 			}
219 219
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
 			if( ctype_alnum( $name ) === false )
223 223
 			{
224
-				$classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
224
+				$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Catalog\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>';
225 225
 				throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
226 226
 			}
227 227
 
Please login to merge, or discard this patch.
src/Controller/Common/Product/Import/Csv/Processor/Catalog/Standard.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 			$listItems = $this->getListItems( $prodid, $this->listTypes );
135 135
 
136 136
 			foreach( $listItems as $listItem ) {
137
-				$listMap[ $listItem->getParentId() ][ $listItem->getType() ] = $listItem;
137
+				$listMap[$listItem->getParentId()][$listItem->getType()] = $listItem;
138 138
 			}
139 139
 
140 140
 			foreach( $map as $pos => $list )
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 					if( isset( $listMap[$catid][$listtype] ) )
164 164
 					{
165 165
 						$listItem = $listMap[$catid][$listtype];
166
-						unset( $listItems[ $listItem->getId() ] );
166
+						unset( $listItems[$listItem->getId()] );
167 167
 					}
168 168
 					else
169 169
 					{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
 			foreach( $manager->searchItems( $search ) as $item ) {
82 82
 				$this->listTypes[$item->getCode()] = $item->getCode();
83 83
 			}
84
-		}
85
-		else
84
+		} else
86 85
 		{
87 86
 			$this->listTypes = array_flip( $this->listTypes );
88 87
 		}
@@ -164,8 +163,7 @@  discard block
 block discarded – undo
164 163
 					{
165 164
 						$listItem = $listMap[$catid][$listtype];
166 165
 						unset( $listItems[ $listItem->getId() ] );
167
-					}
168
-					else
166
+					} else
169 167
 					{
170 168
 						$listItem = $listManager->createItem()->setType( $listtype );
171 169
 					}
Please login to merge, or discard this patch.