Completed
Push — master ( 268d58...7f1d79 )
by Boris
13:24
created

ResourceOwner   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 21
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, $resourceOwnerType;
0 ignored issues
show
Coding Style introduced by
It is generally advisable to only define one property per statement.

Only declaring a single property per statement allows you to later on add doc comments more easily.

It is also recommended by PSR2, so it is a common style that many people expect.

Loading history...
13
14
    public function __construct($resourceOwnerId, $resourceOwnerType)
15
    {
16
        Ensure::string($resourceOwnerId, $resourceOwnerType);
17
        $this->resourceOwnerId   = $resourceOwnerId;
18
        $this->resourceOwnerType = $resourceOwnerType;
19
    }
20
21
    public function getResourceOwnerId()
22
    {
23
        return $this->resourceOwnerId;
24
    }
25
26
    public function getResourceOwnerType()
27
    {
28
        return $this->resourceOwnerType;
29
    }
30
}
31