Code Duplication    Length = 9-9 lines in 2 locations

src/Products.php 2 locations

@@ 18-26 (lines=9) @@
15
        $this->requestHandler = $requestHandler;
16
    }
17
18
    public function create(Product $product): Product
19
    {
20
        $response = $this->requestHandler->post(
21
            '/v1/products',
22
            $product
23
        );
24
        $product = (new ProductMapper())->map($product, $response);
25
        return $product;
26
    }
27
28
    public function update(Product $product): Product
29
    {
@@ 28-36 (lines=9) @@
25
        return $product;
26
    }
27
28
    public function update(Product $product): Product
29
    {
30
        $response = $this->requestHandler->update(
31
            "/v1/products/{$product->getId()}",
32
            $product
33
        );
34
        $product = (new ProductMapper())->map($product, $response);
35
        return $product;
36
    }
37
38
    public function delete(Product $product): bool
39
    {