Completed
Push — ezp-30616 ( 0a36b6 )
by
unknown
21:15 queued 06:15
created

PublishVersionEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getContent() 0 4 1
A getVersionInfo() 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\Content;
10
11
use eZ\Publish\API\Repository\Values\Content\Content;
12
use eZ\Publish\API\Repository\Values\Content\VersionInfo;
13
use eZ\Publish\Core\Event\AfterEvent;
14
15
final class PublishVersionEvent extends AfterEvent
16
{
17
    public const NAME = 'ezplatform.event.version.publish';
18
19
    /**
20
     * @var \eZ\Publish\API\Repository\Values\Content\Content
21
     */
22
    private $content;
23
24
    /**
25
     * @var \eZ\Publish\API\Repository\Values\Content\VersionInfo
26
     */
27
    private $versionInfo;
28
29
    public function __construct(
30
        Content $content,
31
        VersionInfo $versionInfo
32
    ) {
33
        $this->content = $content;
34
        $this->versionInfo = $versionInfo;
35
    }
36
37
    public function getContent(): Content
38
    {
39
        return $this->content;
40
    }
41
42
    public function getVersionInfo(): VersionInfo
43
    {
44
        return $this->versionInfo;
45
    }
46
}
47