ResourceOwner::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
/**
3
 * @author Boris Guéry <[email protected]>
4
 */
5
6
namespace Bgy\OAuth2;
7
8
use Bgy\OAuth2\Utils\Ensure;
9
10
class ResourceOwner
11
{
12
    private $resourceOwnerId;
13
    private $resourceOwnerType;
14
15
    public function __construct($resourceOwnerId, $resourceOwnerType)
16
    {
17
        Ensure::string($resourceOwnerId, $resourceOwnerType);
18
        $this->resourceOwnerId   = $resourceOwnerId;
19
        $this->resourceOwnerType = $resourceOwnerType;
20
    }
21
22
    public function getResourceOwnerId()
23
    {
24
        return $this->resourceOwnerId;
25
    }
26
27
    public function getResourceOwnerType()
28
    {
29
        return $this->resourceOwnerType;
30
    }
31
}
32