Completed
Push — ezp-30616 ( 3c2fb4...b64679 )
by
unknown
30:04 queued 14:26
created

UpdatePolicyEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getPolicy() 0 4 1
A getPolicyUpdateStruct() 0 4 1
A getUpdatedPolicy() 0 4 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\Core\Event\Role;
10
11
use eZ\Publish\API\Repository\Values\User\Policy;
12
use eZ\Publish\API\Repository\Values\User\PolicyUpdateStruct;
13
use eZ\Publish\Core\Event\AfterEvent;
14
15
final class UpdatePolicyEvent extends AfterEvent
16
{
17
    public const NAME = 'ezplatform.event.policy.update';
18
19
    /**
20
     * @var \eZ\Publish\API\Repository\Values\User\Policy
21
     */
22
    private $policy;
23
24
    /**
25
     * @var \eZ\Publish\API\Repository\Values\User\PolicyUpdateStruct
26
     */
27
    private $policyUpdateStruct;
28
29
    /**
30
     * @var \eZ\Publish\API\Repository\Values\User\Policy
31
     */
32
    private $updatedPolicy;
33
34
    public function __construct(
35
        Policy $updatedPolicy,
36
        Policy $policy,
37
        PolicyUpdateStruct $policyUpdateStruct
38
    ) {
39
        $this->policy = $policy;
40
        $this->policyUpdateStruct = $policyUpdateStruct;
41
        $this->updatedPolicy = $updatedPolicy;
42
    }
43
44
    public function getPolicy(): Policy
45
    {
46
        return $this->policy;
47
    }
48
49
    public function getPolicyUpdateStruct(): PolicyUpdateStruct
50
    {
51
        return $this->policyUpdateStruct;
52
    }
53
54
    public function getUpdatedPolicy()
55
    {
56
        return $this->updatedPolicy;
57
    }
58
}
59