Completed
Push — ezp-30646 ( 025610...a2492e )
by
unknown
18:34
created

PublishVersionEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 42
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 getContent() 0 4 1
A getVersionInfo() 0 4 1
A getTranslations() 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
    /**
18
     * @var \eZ\Publish\API\Repository\Values\Content\Content
19
     */
20
    private $content;
21
22
    /**
23
     * @var \eZ\Publish\API\Repository\Values\Content\VersionInfo
24
     */
25
    private $versionInfo;
26
27
    /**
28
     * @var string[]
29
     */
30
    private $translations;
31
32
    public function __construct(
33
        Content $content,
34
        VersionInfo $versionInfo,
35
        array $translations
36
    ) {
37
        $this->content = $content;
38
        $this->versionInfo = $versionInfo;
39
        $this->translations = $translations;
40
    }
41
42
    public function getContent(): Content
43
    {
44
        return $this->content;
45
    }
46
47
    public function getVersionInfo(): VersionInfo
48
    {
49
        return $this->versionInfo;
50
    }
51
52
    public function getTranslations(): array
53
    {
54
        return $this->translations;
55
    }
56
}
57