Passed
Push — develop ( 05a047...238e84 )
by Edwin
02:57
created

Shop::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ShopifyClient\Resource;
4
5
/**
6
 * https://help.shopify.com/api/reference/shop
7
 */
8
class Shop extends AbstractResource
9
{
10
    /**
11
     * @param array $fields
12
     * @return array
13
     */
14 1
    public function get(array $fields = [])
15
    {
16 1
        $response = $this->request('GET', '/admin/shop.json', [
17
            'query' => [
18 1
                'fields' => $fields,
19
            ],
20
        ]);
21
22 1
        return $response['shop'];
23
    }
24
}
25