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

LookupLimitationResult::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
cc 1
nc 1
nop 3
rs 9.9
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