GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( dceff7...e428f3 )
by Mario
03:24
created

InformationCollected::getContentInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\InformationCollection\API\Value\Event;
6
7
use eZ\Publish\API\Repository\Values\Content\Content;
8
use eZ\Publish\API\Repository\Values\Content\Location;
9
use eZ\Publish\API\Repository\Values\ContentType\ContentType;
10
use eZ\Publish\SPI\Persistence\Content\ContentInfo;
11
use Netgen\InformationCollection\API\Value\DataTransfer\AdditionalContent;
12
use Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionData;
13
use Symfony\Component\EventDispatcher\Event;
14
15
final class InformationCollected extends Event
16
{
17
    /**
18
     * @var \Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionData
19
     */
20
    protected $data;
21
22
    /**
23
     * @var \Netgen\InformationCollection\API\Value\DataTransfer\AdditionalContent
24
     */
25
    protected $additionalContent;
26
27
    /**
28
     * @var \eZ\Publish\API\Repository\Values\Content\Location
29
     */
30
    protected $location;
31
32
    /**
33
     * InformationCollected constructor.
34
     *
35
     * @param \Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionData $data
36
     * @param \eZ\Publish\API\Repository\Values\Content\Content $additionalContent
37
     */
38
    public function __construct(
39
        InformationCollectionData $data,
40
        Location $location,
41
        AdditionalContent $additionalContent
42
    )
43
    {
44
        $this->data = $data;
45
        $this->additionalContent = $additionalContent;
46
        $this->location = $location;
47
    }
48
49
    /**
50
     * Return collected data.
51
     *
52
     * @return \Netgen\InformationCollection\Integration\RepositoryForms\InformationCollectionData
53
     */
54
    public function getInformationCollectionStruct(): InformationCollectionData
55
    {
56
        return $this->data;
57
    }
58
59
    /**
60
     * Return ContentType.
61
     *
62
     * @return \eZ\Publish\API\Repository\Values\ContentType\ContentType
63
     */
64
    public function getContentType(): ContentType
65
    {
66
        return $this->data
67
            ->contentDraft
68
            ->getContentType();
69
    }
70
71
    /**
72
     * Return Location.
73
     *
74
     * @return \eZ\Publish\API\Repository\Values\Content\Content
75
     */
76
    public function getContent(): Content
77
    {
78
        return $this->data
79
            ->contentDraft;
80
    }
81
82
    /**
83
     * @return \eZ\Publish\API\Repository\Values\Content\ContentInfo
84
     */
85
    public function getContentInfo(): ContentInfo
86
    {
87
        return $this->data
88
            ->contentDraft
89
            ->contentInfo;
90
    }
91
92
    /**
93
     * @return \eZ\Publish\API\Repository\Values\Content\Location
94
     */
95
    public function getLocation(): Location
96
    {
97
        return $this->location;
98
    }
99
100
    /**
101
     * Returns additional content
102
     * This can be ez content or site api content.
103
     *
104
     * @return \Netgen\InformationCollection\API\Value\DataTransfer\AdditionalContent
105
     */
106
    public function getAdditionalContent(): AdditionalContent
107
    {
108
        return $this->additionalContent;
109
    }
110
}
111