Completed
Push — EZP-30427 ( 8c1757...93ffe2 )
by
unknown
17:19
created

ContentDraftListItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getVersionInfo() 0 4 1
A hasVersionInfo() 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\API\Repository\Values\Content;
10
11
/**
12
 * Item of content drafts list.
13
 */
14
class ContentDraftListItem implements ContentDraftListItemInterface
15
{
16
    /** @var \eZ\Publish\API\Repository\Values\Content\VersionInfo */
17
    private $versionInfo;
18
19
    /**
20
     * @param $versionInfo
21
     */
22
    public function __construct(VersionInfo $versionInfo)
23
    {
24
        $this->versionInfo = $versionInfo;
25
    }
26
27
    /**
28
     * @return \eZ\Publish\API\Repository\Values\Content\VersionInfo|null
29
     */
30
    public function getVersionInfo(): ?VersionInfo
31
    {
32
        return $this->versionInfo;
33
    }
34
35
    /**
36
     * @return bool
37
     */
38
    public function hasVersionInfo(): bool
39
    {
40
        return true;
41
    }
42
}
43