@@ -20,18 +20,18 @@ discard block |
||
20 | 20 | protected $entity = 'Product'; |
21 | 21 | |
22 | 22 | protected $maps = [ |
23 | - 'save' => ['POST', '/products'], |
|
24 | - 'findById' => ['GET', '/products/{itemId}'], |
|
25 | - 'patch' => ['PATCH', '/products/{itemId}'], |
|
26 | - 'update' => ['PUT', '/products/{itemId}'], |
|
27 | - 'fetch' => ['GET', '/products?page={offset}&size={limit}'], |
|
23 | + 'save' => [ 'POST', '/products' ], |
|
24 | + 'findById' => [ 'GET', '/products/{itemId}' ], |
|
25 | + 'patch' => [ 'PATCH', '/products/{itemId}' ], |
|
26 | + 'update' => [ 'PUT', '/products/{itemId}' ], |
|
27 | + 'fetch' => [ 'GET', '/products?page={offset}&size={limit}' ], |
|
28 | 28 | ]; |
29 | 29 | |
30 | 30 | public function save(EntityInterface $product, $route = 'save') |
31 | 31 | { |
32 | 32 | $existent = $product->getPrevious(); |
33 | 33 | |
34 | - $this->log('INFO', 'save', ['route' => $route, 'existent' => $existent]); |
|
34 | + $this->log('INFO', 'save', [ 'route' => $route, 'existent' => $existent ]); |
|
35 | 35 | |
36 | 36 | if ($existent) { |
37 | 37 | return $this->update($product, $existent); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | protected function getMap($route, Product $product) |
44 | 44 | { |
45 | - return $this->factoryMap($route, ['itemId' => $product->getId()]); |
|
45 | + return $this->factoryMap($route, [ 'itemId' => $product->getId() ]); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function commit() |