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

LookupLimitationResult   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 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 LookupLimitation for module and function in the context of current User.
15
 */
16
final class LookupLimitationResult extends ValueObject
17
{
18
    /**
19
     * @var bool
20
     */
21
    protected $hasAccess;
22
23
    /**
24
     * @var \eZ\Publish\API\Repository\Values\User\Limitation[]
25
     */
26
    protected $roleLimitations;
27
28
    /**
29
     * @var \eZ\Publish\API\Repository\Values\User\LookupPolicyLimitations[]
30
     */
31
    protected $lookupPolicyLimitations;
32
33
    /**
34
     * @param bool $hasAccess
35
     * @param \eZ\Publish\API\Repository\Values\User\Limitation[] $roleLimitations
36
     * @param \eZ\Publish\API\Repository\Values\User\LookupPolicyLimitations[] $lookupPolicyLimitations
37
     */
38
    public function __construct(
39
        bool $hasAccess,
40
        array $roleLimitations = [],
41
        array $lookupPolicyLimitations = []
42
    ) {
43
        parent::__construct();
44
45
        $this->hasAccess = $hasAccess;
46
        $this->lookupPolicyLimitations = $lookupPolicyLimitations;
47
        $this->roleLimitations = $roleLimitations;
48
    }
49
}
50