@@ -87,8 +87,7 @@ |
||
| 87 | 87 | foreach( $manager->searchItems( $search ) as $item ) { |
| 88 | 88 | $this->listTypes[$item->getCode()] = $item->getCode(); |
| 89 | 89 | } |
| 90 | - } |
|
| 91 | - else |
|
| 90 | + } else |
|
| 92 | 91 | { |
| 93 | 92 | $this->listTypes = array_flip( $this->listTypes ); |
| 94 | 93 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $aimeos = \TestHelperJobs::getAimeos(); |
| 18 | 18 | |
| 19 | 19 | $obj = \Aimeos\Controller\Jobs\Catalog\Import\Csv\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 | |
@@ -64,13 +64,13 @@ |
||
| 64 | 64 | * @since 2018.04 |
| 65 | 65 | * @category Developer |
| 66 | 66 | */ |
| 67 | - if ( $name === null ) { |
|
| 68 | - $name = $context->getConfig()->get('controller/jobs/subscription/process/renew/name', 'Standard'); |
|
| 67 | + if( $name === null ) { |
|
| 68 | + $name = $context->getConfig()->get( 'controller/jobs/subscription/process/renew/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\\Subscription\\Process\\Renew\\' . $name : '<not a string>'; |
|
| 73 | + $classname = is_string( $name ) ? '\\Aimeos\\Controller\\Jobs\\Subscription\\Process\\Renew\\' . $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 | |
@@ -153,8 +153,7 @@ |
||
| 153 | 153 | |
| 154 | 154 | $interval = new \DateInterval( $item->getInterval() ); |
| 155 | 155 | $item->setDateNext( date_create( $item->getTimeCreated() )->add( $interval )->format( 'Y-m-d' ) ); |
| 156 | - } |
|
| 157 | - elseif( $item->getTimeCreated() < $date ) |
|
| 156 | + } elseif( $item->getTimeCreated() < $date ) |
|
| 158 | 157 | { |
| 159 | 158 | $item->setStatus( 0 ); |
| 160 | 159 | } |
@@ -590,8 +590,7 @@ |
||
| 590 | 590 | { |
| 591 | 591 | $manager->moveItem( $item->getId(), $item->getParentId(), $parentid ); |
| 592 | 592 | $item = $manager->saveItem( $item ); |
| 593 | - } |
|
| 594 | - else |
|
| 593 | + } else |
|
| 595 | 594 | { |
| 596 | 595 | $item = $manager->insertItem( $item, $parentid ); |
| 597 | 596 | } |
@@ -119,8 +119,7 @@ |
||
| 119 | 119 | { |
| 120 | 120 | $capdate = date( 'Y-m-d 00:00:00', time() - 86400 * $capDays ); |
| 121 | 121 | $expr[] = $orderSearch->compare( '<=', 'order.datepayment', $capdate ); |
| 122 | - } |
|
| 123 | - else |
|
| 122 | + } else |
|
| 124 | 123 | { |
| 125 | 124 | $expr[] = $orderSearch->compare( '==', 'order.statusdelivery', $status ); |
| 126 | 125 | } |
@@ -64,13 +64,13 @@ |
||
| 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 | |
@@ -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 | } |
@@ -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 | } |