Completed
Push — EZP-30969-fetch-reverse-relati... ( da6afe...4545bb )
by
unknown
17:04 queued 45s
created

UnauthorizedContentDraftListItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
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\DraftList\Item;
10
11
use eZ\Publish\API\Repository\Values\Content\DraftList\ContentDraftListItemInterface;
12
use eZ\Publish\API\Repository\Values\Content\VersionInfo;
13
14
/**
15
 * Item of content drafts list which represents draft to which user has no access for.
16
 */
17
class UnauthorizedContentDraftListItem implements ContentDraftListItemInterface
18
{
19
    /** @var string */
20
    private $module;
21
22
    /** @var string */
23
    private $function;
24
25
    /** @var array */
26
    private $payload;
27
28
    /**
29
     * @param string $module
30
     * @param string $function
31
     * @param array $payload
32
     */
33
    public function __construct(string $module, string $function, array $payload)
34
    {
35
        $this->module = $module;
36
        $this->function = $function;
37
        $this->payload = $payload;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getModule(): string
44
    {
45
        return $this->module;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getFunction(): string
52
    {
53
        return $this->function;
54
    }
55
56
    /**
57
     * @return array
58
     */
59
    public function getPayload(): array
60
    {
61
        return $this->payload;
62
    }
63
64
    /**
65
     * @return \eZ\Publish\API\Repository\Values\Content\VersionInfo|null
66
     */
67
    public function getVersionInfo(): ?VersionInfo
68
    {
69
        return null;
70
    }
71
72
    /**
73
     * @return bool
74
     */
75
    public function hasVersionInfo(): bool
76
    {
77
        return false;
78
    }
79
}
80