@@ -609,7 +609,7 @@ |
||
| 609 | 609 | ->oneOf( $view->param( 'f_oneid', [] ) ) |
| 610 | 610 | ->category( $catids, 'default', $level ) |
| 611 | 611 | ->text( $view->param( 'f_search' ) ) |
| 612 | - ->slice( ($page - 1) * $size, $size )->sort( $sort ) |
|
| 612 | + ->slice( ( $page - 1 ) * $size, $size )->sort( $sort ) |
|
| 613 | 613 | ->search( $domains, $total ); |
| 614 | 614 | |
| 615 | 615 | if( $catids !== [] ) |
@@ -205,8 +205,7 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | $html = $view->render( $this->getTemplatePath( $tplconf, $default ) ); |
| 208 | - } |
|
| 209 | - else |
|
| 208 | + } else |
|
| 210 | 209 | { |
| 211 | 210 | $html = $this->modifyBody( $html, $uid ); |
| 212 | 211 | } |
@@ -290,8 +289,7 @@ discard block |
||
| 290 | 289 | { |
| 291 | 290 | $this->logException( $e ); |
| 292 | 291 | } |
| 293 | - } |
|
| 294 | - else |
|
| 292 | + } else |
|
| 295 | 293 | { |
| 296 | 294 | $html = $this->modifyHeader( $html, $uid ); |
| 297 | 295 | } |
@@ -179,8 +179,7 @@ discard block |
||
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | $html = $view->render( $view->config( $tplconf, $default ) ); |
| 182 | - } |
|
| 183 | - else |
|
| 182 | + } else |
|
| 184 | 183 | { |
| 185 | 184 | $html = $this->modifyBody( $html, $uid ); |
| 186 | 185 | } |
@@ -249,8 +248,7 @@ discard block |
||
| 249 | 248 | { |
| 250 | 249 | $this->logException( $e ); |
| 251 | 250 | } |
| 252 | - } |
|
| 253 | - else |
|
| 251 | + } else |
|
| 254 | 252 | { |
| 255 | 253 | $html = $this->modifyHeader( $html, $uid ); |
| 256 | 254 | } |
@@ -327,7 +327,7 @@ |
||
| 327 | 327 | $config['count'] = 0; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - if( $maxcnt === null || ((int) $config['count']) < $maxcnt ) |
|
| 330 | + if( $maxcnt === null || ( (int) $config['count'] ) < $maxcnt ) |
|
| 331 | 331 | { |
| 332 | 332 | $config['count']++; |
| 333 | 333 | $listItem->setConfig( $config ); |
@@ -249,13 +249,11 @@ |
||
| 249 | 249 | $response->withHeader( 'Expires', '0' ); |
| 250 | 250 | |
| 251 | 251 | $response->withBody( $response->createStream( $fs->reads( $value ) ) ); |
| 252 | - } |
|
| 253 | - elseif( filter_var( $value, FILTER_VALIDATE_URL ) !== false ) |
|
| 252 | + } elseif( filter_var( $value, FILTER_VALIDATE_URL ) !== false ) |
|
| 254 | 253 | { |
| 255 | 254 | $response->withHeader( 'Location', $value ); |
| 256 | 255 | $response->withStatus( 303 ); |
| 257 | - } |
|
| 258 | - else |
|
| 256 | + } else |
|
| 259 | 257 | { |
| 260 | 258 | $response->withStatus( 404 ); |
| 261 | 259 | } |
@@ -541,15 +541,15 @@ |
||
| 541 | 541 | |
| 542 | 542 | |
| 543 | 543 | /** |
| 544 | - * Returns the template for the given configuration key |
|
| 545 | - * |
|
| 546 | - * If the "l_type" parameter is present, a specific template for this given |
|
| 547 | - * type is used if available. |
|
| 548 | - * |
|
| 549 | - * @param string $confkey Key to the configuration setting for the template |
|
| 550 | - * @param string $default Default template if none is configured or not found |
|
| 551 | - * @return string Relative template path |
|
| 552 | - */ |
|
| 544 | + * Returns the template for the given configuration key |
|
| 545 | + * |
|
| 546 | + * If the "l_type" parameter is present, a specific template for this given |
|
| 547 | + * type is used if available. |
|
| 548 | + * |
|
| 549 | + * @param string $confkey Key to the configuration setting for the template |
|
| 550 | + * @param string $default Default template if none is configured or not found |
|
| 551 | + * @return string Relative template path |
|
| 552 | + */ |
|
| 553 | 553 | protected function getTemplatePath( $confkey, $default ) |
| 554 | 554 | { |
| 555 | 555 | if( ( $type = $this->view->param( 'l_type' ) ) !== null && ctype_alnum( $type ) !== false ) { |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | if( $item instanceof \Aimeos\MShop\Common\Item\ListRef\Iface ) |
| 341 | 341 | { |
| 342 | 342 | $this->addMetaItemRef( $item, $expires, $tags, $tagAll ); |
| 343 | - $idMap[ $item->getResourceType() ][] = $item->getId(); |
|
| 343 | + $idMap[$item->getResourceType()][] = $item->getId(); |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | $this->addMetaItemSingle( $item, $expires, $tags, $tagAll ); |
@@ -606,11 +606,11 @@ discard block |
||
| 606 | 606 | 'header' => $this->getParamHash( $prefixes, $uid . ':' . $confkey . ':header', $cfg ), |
| 607 | 607 | ); |
| 608 | 608 | |
| 609 | - if( !isset( $this->cache[ $keys[$type] ] ) ) { |
|
| 609 | + if( !isset( $this->cache[$keys[$type]] ) ) { |
|
| 610 | 610 | $this->cache = $context->getCache()->getMultiple( $keys ); |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | - return ( isset( $this->cache[ $keys[$type] ] ) ? $this->cache[ $keys[$type] ] : null ); |
|
| 613 | + return ( isset( $this->cache[$keys[$type]] ) ? $this->cache[$keys[$type]] : null ); |
|
| 614 | 614 | } |
| 615 | 615 | |
| 616 | 616 | |
@@ -522,12 +522,10 @@ |
||
| 522 | 522 | { |
| 523 | 523 | throw new \Aimeos\Client\Html\Exception( $e->getMessage() ); |
| 524 | 524 | } |
| 525 | - } |
|
| 526 | - else if( function_exists( 'mime_content_type' ) ) |
|
| 525 | + } else if( function_exists( 'mime_content_type' ) ) |
|
| 527 | 526 | { |
| 528 | 527 | $mimetype = mime_content_type( $filename ); |
| 529 | - } |
|
| 530 | - else |
|
| 528 | + } else |
|
| 531 | 529 | { |
| 532 | 530 | $mimetype = 'application/binary'; |
| 533 | 531 | } |
@@ -457,12 +457,10 @@ |
||
| 457 | 457 | { |
| 458 | 458 | throw new \Aimeos\Client\Html\Exception( $e->getMessage() ); |
| 459 | 459 | } |
| 460 | - } |
|
| 461 | - else if( function_exists( 'mime_content_type' ) ) |
|
| 460 | + } else if( function_exists( 'mime_content_type' ) ) |
|
| 462 | 461 | { |
| 463 | 462 | $mimetype = mime_content_type( $filename ); |
| 464 | - } |
|
| 465 | - else |
|
| 463 | + } else |
|
| 466 | 464 | { |
| 467 | 465 | $mimetype = 'application/binary'; |
| 468 | 466 | } |
@@ -301,7 +301,9 @@ |
||
| 301 | 301 | $controller = \Aimeos\Controller\Frontend::create( $context, 'customer' ); |
| 302 | 302 | $view->summaryCustomerId = $controller->findItem( $addr->getEmail() )->getId(); |
| 303 | 303 | } |
| 304 | - catch( \Exception $e ) {} |
|
| 304 | + catch( \Exception $e ) |
|
| 305 | + { |
|
| 306 | +} |
|
| 305 | 307 | } |
| 306 | 308 | |
| 307 | 309 | $view->summaryTaxRates = $this->getTaxRates( $view->standardBasket ); |
@@ -249,8 +249,7 @@ |
||
| 249 | 249 | { |
| 250 | 250 | $view->standardErrorList = $view->get( 'standardErrorList', [] ) + $errors; |
| 251 | 251 | throw new \Aimeos\Client\Html\Exception( sprintf( 'Please recheck your delivery choice' ) ); |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $basketCtrl->addService( 'delivery', $serviceId, $attributes ); |
| 256 | 255 | } |
@@ -249,8 +249,7 @@ |
||
| 249 | 249 | { |
| 250 | 250 | $view->standardErrorList = $view->get( 'standardErrorList', [] ) + $errors; |
| 251 | 251 | throw new \Aimeos\Client\Html\Exception( sprintf( 'Please recheck your payment choice' ) ); |
| 252 | - } |
|
| 253 | - else |
|
| 252 | + } else |
|
| 254 | 253 | { |
| 255 | 254 | $basketCtrl->addService( 'payment', $serviceId, $attributes ); |
| 256 | 255 | } |