@@ -70,6 +70,6 @@ |
||
70 | 70 | */ |
71 | 71 | public function set( \Aimeos\MShop\Common\Item\Iface $item ) |
72 | 72 | { |
73 | - $this->prodmap[ $item->getCode() ] = $item->getId(); |
|
73 | + $this->prodmap[$item->getCode()] = $item->getId(); |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | \ No newline at end of file |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | if( ctype_alnum( $type ) === false ) |
59 | 59 | { |
60 | - $classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Cache\\' . $type : '<not a string>'; |
|
60 | + $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Product\\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 |
||
67 | 67 | |
68 | 68 | if( ctype_alnum( $name ) === false ) |
69 | 69 | { |
70 | - $classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Cache\\' . $type . '\\' . $name : '<not a string>'; |
|
70 | + $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Product\\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 |
||
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 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | { |
257 | 257 | if( ctype_alnum( $type ) === false ) |
258 | 258 | { |
259 | - $classname = is_string($type) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Processor\\' . $type : '<not a string>'; |
|
259 | + $classname = is_string( $type ) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Processor\\' . $type : '<not a string>'; |
|
260 | 260 | throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
261 | 261 | } |
262 | 262 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | |
265 | 265 | if( ctype_alnum( $name ) === false ) |
266 | 266 | { |
267 | - $classname = is_string($name) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>'; |
|
267 | + $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Common\\Product\\Import\\Csv\\Processor\\' . $type . '\\' . $name : '<not a string>'; |
|
268 | 268 | throw new \Aimeos\Controller\Jobs\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
269 | 269 | } |
270 | 270 | |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | $search->setSlice( 0, count( $codes ) ); |
301 | 301 | |
302 | 302 | foreach( $manager->searchItems( $search, $domains ) as $item ) { |
303 | - $result[ $item->getCode() ] = $item; |
|
303 | + $result[$item->getCode()] = $item; |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | return $result; |
@@ -170,9 +170,12 @@ discard block |
||
170 | 170 | { |
171 | 171 | foreach( $codes as $code ) |
172 | 172 | { |
173 | - try { |
|
173 | + try |
|
174 | + { |
|
174 | 175 | $basket->addCoupon( $code ); |
175 | - } catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) { |
|
176 | + } |
|
177 | + catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) |
|
178 | + { |
|
176 | 179 | $basket->deleteCoupon( $code ); |
177 | 180 | } |
178 | 181 | } |
@@ -282,7 +285,9 @@ discard block |
||
282 | 285 | $context->setUserId( $baseItem->getCustomerId() ); |
283 | 286 | $context->setGroupIds( $customerItem->getGroups() ); |
284 | 287 | } |
285 | - catch( \Exception $e ) {} // Subscription without account |
|
288 | + catch( \Exception $e ) |
|
289 | + { |
|
290 | +} // Subscription without account |
|
286 | 291 | |
287 | 292 | return $context; |
288 | 293 | } |
@@ -64,13 +64,13 @@ |
||
64 | 64 | * @since 2019.02 |
65 | 65 | * @category Developer |
66 | 66 | */ |
67 | - if ( $name === null ) { |
|
67 | + if( $name === null ) { |
|
68 | 68 | $name = $context->getConfig()->get( 'controller/jobs/catalog/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\\Catalog\\Export\\Sitemap\\' . $name : '<not a string>'; |
|
73 | + $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Catalog\\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 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $this->context->getConfig()->set( 'controller/jobs/catalog/export/sitemap/location', '' ); |
79 | 79 | |
80 | - $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
80 | + $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
81 | 81 | |
82 | 82 | $this->object->run(); |
83 | 83 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | $this->context->getConfig()->set( 'controller/jobs/catalog/export/sitemap/location', null ); |
88 | 88 | |
89 | - $this->setExpectedException('\\Aimeos\\Controller\\Jobs\\Exception'); |
|
89 | + $this->setExpectedException( '\\Aimeos\\Controller\\Jobs\\Exception' ); |
|
90 | 90 | |
91 | 91 | $this->object->run(); |
92 | 92 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $aimeos = \TestHelperJobs::getAimeos(); |
18 | 18 | |
19 | 19 | $obj = \Aimeos\Controller\Jobs\Catalog\Export\Sitemap\Factory::create( $context, $aimeos ); |
20 | - $this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj); |
|
20 | + $this->assertInstanceOf( '\\Aimeos\\Controller\\Jobs\\Iface', $obj ); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 |
@@ -196,10 +196,10 @@ discard block |
||
196 | 196 | * @see controller/jobs/catalog/export/sitemap/max-query |
197 | 197 | * @see controller/jobs/catalog/export/sitemap/changefreq |
198 | 198 | */ |
199 | - $default = array('gzip-mode' => 'wb'); |
|
199 | + $default = array( 'gzip-mode' => 'wb' ); |
|
200 | 200 | $options = $config->get( 'controller/jobs/catalog/export/sitemap/container/options', $default ); |
201 | 201 | |
202 | - if ( $location === null || $location === '' ) { |
|
202 | + if( $location === null || $location === '' ) { |
|
203 | 203 | $msg = sprintf( 'Required configuration for "%1$s" is missing', 'controller/jobs/catalog/export/sitemap/location' ); |
204 | 204 | throw new \Aimeos\Controller\Jobs\Exception( $msg ); |
205 | 205 | } |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | $manager = \Aimeos\MShop::create( $this->getContext(), 'catalog' ); |
421 | 421 | |
422 | 422 | $search = $manager->createSearch( $default ); |
423 | - $search->setSortations( array($search->sort( '+', 'catalog.id' )) ); |
|
423 | + $search->setSortations( array( $search->sort( '+', 'catalog.id' ) ) ); |
|
424 | 424 | $search->setSlice( 0, $maxQuery ); |
425 | 425 | |
426 | 426 | $content = $this->createContent( $container, $filenum ); |