NextEngineResourceOwner::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Shippinno\NextEngine\OAuth2\Client\Provider;
4
5
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
6
7
class NextEngineResourceOwner implements ResourceOwnerInterface
8
{
9
    /**
10
     * Raw response
11
     *
12
     * @var array
13
     */
14
    protected $response;
15
16
    /**
17
     * @param array $response
18
     */
19
    public function __construct(array $response)
20
    {
21
        $this->response = $response;
22
    }
23
24
    /**
25
     * Returns the identifier of the authorized resource owner.
26
     *
27
     * @return string
28
     */
29
    public function getId()
30
    {
31
        return $this->response['uid'];
32
    }
33
34
    /**
35
     * Returns the shop name.
36
     *
37
     * @return string
38
     */
39
    public function getCompanyName()
40
    {
41
        return $this->response['company_name'];
42
    }
43
44
    /**
45
     * Returns the shop name.
46
     *
47
     * @return string
48
     */
49
    public function getCompanyNameKane()
50
    {
51
        return $this->response['company_kana'];
52
    }
53
54
    /**
55
     * Return all of the owner details available as an array.
56
     *
57
     * @return array
58
     */
59
    public function toArray()
60
    {
61
        return $this->response;
62
    }
63
}
64