Passed
Push — master ( 6ea451...1ef48a )
by Anton
01:35
created

Reference::__role()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
namespace Cycle\ORM\Promise;
11
12
class Reference implements ReferenceInterface
13
{
14
    /** @var string */
15
    private $role;
16
17
    /** @var array */
18
    private $scope = [];
19
20
    /**
21
     * @param string $role
22
     * @param array  $scope
23
     */
24
    public function __construct(string $role, array $scope)
25
    {
26
        $this->role = $role;
27
        $this->scope = $scope;
28
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public function __role(): string
34
    {
35
        return $this->role;
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41
    public function __scope(): array
42
    {
43
        return $this->scope;
44
    }
45
}