Request::store()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Reviewsio\Endpoints\ProductReviewBySku;
4
5
use Reviewsio\Endpoints\AbstractEndpointRequest;
6
use Reviewsio\Endpoints\HasQueryPagination;
7
8
/**
9
 * https://api.reviews.io/documentation/index.html#api-Product_Reviews-List_Reviews_for_Product
10
 */
11
class Request extends AbstractEndpointRequest
12
{
13
    use HasQueryPagination;
14
15 1
    public function store(string $store): static
16
    {
17 1
        return $this->addParameterToQuery('store', $store);
18
    }
19
20 2
    public function sku(string $sku): static
21
    {
22 2
        return $this->addParameterToQuery('sku', $sku);
23
    }
24
25 1
    public function mpn(string $mpn): static
26
    {
27 1
        return $this->addParameterToQuery('mpn', $mpn);
28
    }
29
30 2
    public function call(array $options = []): Response
31
    {
32 2
        $this->withQuery($options);
33 2
        $response = $this->client->pendingRequest()->get('product/review', array_merge($this->query(), $options));
34
35 2
        return new Response($response);
36
    }
37
}
38