ResourceOwner   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 22
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResourceOwnerId() 0 4 1
A getResourceOwnerType() 0 4 1
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