Completed
Push — master ( 83fb2b...0f847f )
by
unknown
42:12 queued 20:32
created

LookupPolicyLimitations   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\API\Repository\Values\User;
10
11
use eZ\Publish\API\Repository\Values\ValueObject;
12
13
/**
14
 * This class represents a result of lookup limitation for module and function in the context of current User.
15
 */
16
final class LookupPolicyLimitations extends ValueObject
17
{
18
    /**
19
     * @var \eZ\Publish\API\Repository\Values\User\Policy
20
     */
21
    protected $policy;
22
23
    /**
24
     * @var \eZ\Publish\API\Repository\Values\User\Limitation[]
25
     */
26
    protected $limitations;
27
28
    /**
29
     * @param \eZ\Publish\API\Repository\Values\User\Policy $policy
30
     * @param \eZ\Publish\API\Repository\Values\User\Limitation[] $limitations
31
     */
32
    public function __construct(Policy $policy, array $limitations = [])
33
    {
34
        parent::__construct();
35
36
        $this->policy = $policy;
37
        $this->limitations = $limitations;
38
    }
39
}
40