Shop::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ShopifyClient\Resource;
4
5
use ShopifyClient\Action\Action;
6
use ShopifyClient\Request;
7
8
/**
9
 * https://help.shopify.com/api/reference/shop
10
 *
11
 * @method get
12
 *
13
 * @property ShopMetaField $metafields
14
 */
15
class Shop extends AbstractResource implements Resource
16
{
17
    /**
18
     * @var array
19
     */
20
    protected $childResources = [
21
        'metafields' => ShopMetaField::class,
22
    ];
23
24
    /**
25
     * Shop constructor.
26
     * @param Request $request
27
     */
28 5
    public function __construct(Request $request)
29
    {
30 5
        parent::__construct($request);
31
32 5
        $this->actions->add(
33 5
            'get',
34 5
            new Action(
35 5
                Request::METHOD_GET,
36 5
                'shop.json',
37 5
                'shop'
38
            )
39
        );
40 5
    }
41
}
42