Completed
Push — master ( 2236d8...f66191 )
by Taosikai
10:51
created

ShopManager::getModelClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the slince/shopify-api-php
5
 *
6
 * (c) Slince <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Slince\Shopify\Manager\Shop;
13
14
use Slince\Shopify\Common\Manager\AbstractManager;
15
16
class ShopManager extends AbstractManager implements ShopManagerInterface
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getModelClass()
22
    {
23
        return Shop::class;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public static function getServiceName()
30
    {
31
        return 'shops';
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getResourceName()
38
    {
39
        return 'shop';
40
    }
41
42
    /**
43
     * Gets the shop.
44
     *
45
     * @return Shop
46
     */
47
    public function get()
48
    {
49
        $data = $this->client->get('shop');
50
51
        return $this->fromArray($data['shop']);
52
    }
53
}