@@ -101,8 +101,7 @@ |
||
| 101 | 101 | foreach( $items as $item ) { |
| 102 | 102 | $data[] = $entryFcn( $item ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $data = $entryFcn( $items ); |
| 108 | 107 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $first = ( $offset > 0 ? 0 : null ); |
| 24 | 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
| 25 | 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); |
| 26 | -$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null ); |
|
| 26 | +$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); |
@@ -285,8 +285,7 @@ |
||
| 285 | 285 | $data[] = $entryFcn( $item ); |
| 286 | 286 | $included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) ); |
| 287 | 287 | } |
| 288 | - } |
|
| 289 | - else |
|
| 288 | + } else |
|
| 290 | 289 | { |
| 291 | 290 | $data = $entryFcn( $items ); |
| 292 | 291 | $included = $flatFcn( $inclFcn( $items ) ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |
@@ -123,6 +123,9 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $name |
|
| 128 | + */ |
|
| 126 | 129 | protected function access( $name ) |
| 127 | 130 | { |
| 128 | 131 | $class = new \ReflectionClass( \Aimeos\Client\JsonApi\Common\Factory\Base::class ); |
@@ -351,6 +351,9 @@ |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | |
| 354 | + /** |
|
| 355 | + * @param string $name |
|
| 356 | + */ |
|
| 354 | 357 | protected function access( $name ) |
| 355 | 358 | { |
| 356 | 359 | $class = new \ReflectionClass( \Aimeos\Client\JsonApi\Order\Standard::class ); |
@@ -396,7 +396,7 @@ |
||
| 396 | 396 | $baseManager = \Aimeos\MShop::create( $this->context, 'order/base' ); |
| 397 | 397 | |
| 398 | 398 | $search = $baseManager->createSearch(); |
| 399 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 399 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 400 | 400 | |
| 401 | 401 | $items = $baseManager->searchItems( $search ); |
| 402 | 402 | |
@@ -129,8 +129,7 @@ |
||
| 129 | 129 | if( ( $client = @call_user_func_array( array( $factory, 'createClient' ), $args ) ) === false ) { |
| 130 | 130 | throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 ); |
| 131 | 131 | } |
| 132 | - } |
|
| 133 | - else |
|
| 132 | + } else |
|
| 134 | 133 | { |
| 135 | 134 | $client = self::createRoot( $context, $path, $name ); |
| 136 | 135 | } |
@@ -84,6 +84,9 @@ |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | |
| 87 | + /** |
|
| 88 | + * @param string $site |
|
| 89 | + */ |
|
| 87 | 90 | private static function createContext( $site ) |
| 88 | 91 | { |
| 89 | 92 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); |
@@ -374,7 +374,7 @@ |
||
| 374 | 374 | $baseManager = \Aimeos\MShop::create( $this->context, 'order/base' ); |
| 375 | 375 | |
| 376 | 376 | $search = $baseManager->createSearch(); |
| 377 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 377 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 378 | 378 | |
| 379 | 379 | $items = $baseManager->searchItems( $search ); |
| 380 | 380 | |