Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
24 | public function update(Product $product): Product |
||
25 | { |
||
26 | $this->validateIsNotNewEntity($product->getId()); |
||
27 | return $this->doUpdate( |
||
28 | self::ENDPOINT."/{$product->getId()}", |
||
29 | $product, |
||
30 | function ($response) use ($product) { |
||
31 | return (new ProductMapper())->map($product, $response); |
||
32 | } |
||
33 | ); |
||
34 | } |
||
35 | |||
74 |