@@ -115,7 +115,6 @@ |
||
| 115 | 115 | * |
| 116 | 116 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
| 117 | 117 | * @param \Psr\Http\Message\ResponseInterface $response Response object |
| 118 | - * @param string|null $prefix Form parameter prefix when nesting parameters is required |
|
| 119 | 118 | * @return \Psr\Http\Message\ResponseInterface Modified response object |
| 120 | 119 | */ |
| 121 | 120 | public function put( ServerRequestInterface $request, ResponseInterface $response ) |
@@ -136,8 +136,7 @@ |
||
| 136 | 136 | if( ( $client = @call_user_func_array( array( $factory, 'createClient' ), $args ) ) === false ) { |
| 137 | 137 | throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 ); |
| 138 | 138 | } |
| 139 | - } |
|
| 140 | - else |
|
| 139 | + } else |
|
| 141 | 140 | { |
| 142 | 141 | $client = self::createClientRoot( $context, $view, $templatePaths, $path, $name ); |
| 143 | 142 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * Adds the decorators to the JSON API client object |
| 42 | 42 | * |
| 43 | - * @param \Aimeos\Client\JsonApi\Common\Iface $client Client object |
|
| 43 | + * @param \Aimeos\Client\JsonApi\Iface $client Client object |
|
| 44 | 44 | * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects |
| 45 | 45 | * @param \Aimeos\MW\View\Iface $view View object |
| 46 | 46 | * @param array $templatePaths List of file system paths where the templates are stored |
@@ -101,8 +101,7 @@ |
||
| 101 | 101 | $decorators = $config->get( 'client/jsonapi/' . $dpath . 'decorators/local', [] ); |
| 102 | 102 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path ); |
| 103 | 103 | } |
| 104 | - } |
|
| 105 | - else |
|
| 104 | + } else |
|
| 106 | 105 | { |
| 107 | 106 | $classprefix = '\\Aimeos\\Client\\JsonApi\\Common\\Decorator\\'; |
| 108 | 107 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path ); |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | $baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
| 269 | 269 | |
| 270 | 270 | $search = $baseManager->createSearch(); |
| 271 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 271 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 272 | 272 | |
| 273 | 273 | $items = $baseManager->searchItems( $search ); |
| 274 | 274 | |
@@ -199,6 +199,9 @@ |
||
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | |
| 202 | + /** |
|
| 203 | + * @param string $code |
|
| 204 | + */ |
|
| 202 | 205 | protected function addProduct( $code ) |
| 203 | 206 | { |
| 204 | 207 | $prodId = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( $code )->getId(); |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | foreach( $items as $localeItem ) { |
| 84 | 84 | $data[] = $entryFcn( $localeItem ); |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - else |
|
| 86 | + } else |
|
| 88 | 87 | { |
| 89 | 88 | $data = $entryFcn( $items ); |
| 90 | 89 | } |
@@ -91,8 +91,7 @@ |
||
| 91 | 91 | foreach( $items as $addrItem ) { |
| 92 | 92 | $data[] = $entryFcn( $addrItem ); |
| 93 | 93 | } |
| 94 | - } |
|
| 95 | - else |
|
| 94 | + } else |
|
| 96 | 95 | { |
| 97 | 96 | $data = $entryFcn( $items ); |
| 98 | 97 | } |
@@ -156,8 +156,7 @@ |
||
| 156 | 156 | $data[] = $entryFcn( $item, $prices, $feConfig ); |
| 157 | 157 | $included = array_merge( $included, $refFcn( $item ) ); |
| 158 | 158 | } |
| 159 | - } |
|
| 160 | - else |
|
| 159 | + } else |
|
| 161 | 160 | { |
| 162 | 161 | $data = $entryFcn( $this->items, $prices, $feConfig ); |
| 163 | 162 | $included = $refFcn( $this->items ); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | unset( $attributes['service.config'] ); // don't expose private information |
| 42 | 42 | |
| 43 | 43 | $params = array( 'resource' => $type, 'id' => $id ); |
| 44 | - $basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType() ]; |
|
| 44 | + $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType()]; |
|
| 45 | 45 | |
| 46 | 46 | if( isset( $fields[$type] ) ) { |
| 47 | 47 | $attributes = array_intersect_key( $attributes, $fields[$type] ); |
@@ -313,6 +313,9 @@ |
||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | |
| 316 | + /** |
|
| 317 | + * @param string $name |
|
| 318 | + */ |
|
| 316 | 319 | protected function access( $name ) |
| 317 | 320 | { |
| 318 | 321 | $class = new \ReflectionClass( '\Aimeos\Client\JsonApi\Order\Standard' ); |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | $baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
| 269 | 269 | |
| 270 | 270 | $search = $baseManager->createSearch(); |
| 271 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 271 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 272 | 272 | |
| 273 | 273 | $items = $baseManager->searchItems( $search ); |
| 274 | 274 | |