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 — dev ( 70d7cd...5f33a9 )
by Андрей
03:36
created

ObjectInfo::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @link  https://github.com/old-town/workflow-zf2-toolkit
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Toolkit\Entity\DoctrineWorkflowStory;
7
8
use Doctrine\Common\Collections\ArrayCollection;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * Class Object
13
 *
14
 * @ORM\Entity()
15
 * @ORM\Table(name="wf_object_info")
16
 *
17
 * @package OldTown\Workflow\ZF2\Toolkit\Entity\DoctrineWorkflowStory
18
 */
19
class ObjectInfo
20
{
21
    /**
22
     * Уникальный id данных о объекте
23
     *
24
     * @ORM\Id()
25
     * @ORM\Column(name="id", type="integer")
26
     * @ORM\GeneratedValue(strategy="IDENTITY")
27
     *
28
     * @var string
29
     */
30
    protected $id;
31
32
    /**
33
     * Имя класса объекта
34
     *
35
     * @ORM\Column(name="class_name", type="string", length=180)
36
     *
37
     *
38
     * @var string
39
     */
40
    protected $className;
41
42
    /**
43
     * id объекта
44
     *
45
     * @ORM\Column(name="object_id", type="string", length=50)
46
     *
47
     *
48
     * @var string
49
     */
50
    protected $objectId;
51
52
    /**
53
     * Псевдоним по которому можно обратиться к объекту
54
     *
55
     * @ORM\Column(name="alias", type="string", length=50)
56
     *
57
     *
58
     * @var string
59
     */
60
    protected $alias;
61
62
    /**
63
     * Все процессы workflow которые связанны с данным процесом
64
     *
65
     * @ORM\ManyToMany(targetEntity="ExtEntry", mappedBy="objectsInfo")
66
     *
67
     * @var ExtEntry[]|ArrayCollection
68
     */
69
    protected $entries;
70
71
    /**
72
     * ObjectInfo constructor.
73
     */
74
    public function __construct()
75
    {
76
        $this->entries = new ArrayCollection();
77
    }
78
79
    /**
80
     * Уникальный id данных о объект
81
     *
82
     * @return string
83
     */
84
    public function getId()
85
    {
86
        return $this->id;
87
    }
88
89
    /**
90
     * Возвращает уникальный id данных о объект
91
     *
92
     * @param string $id
93
     *
94
     * @return $this
95
     */
96
    public function setId($id)
97
    {
98
        $this->id = $id;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Имя класса объекта
105
     *
106
     * @return string
107
     */
108
    public function getClassName()
109
    {
110
        return $this->className;
111
    }
112
113
    /**
114
     * Устанавливает имя класса объекта
115
     *
116
     * @param string $className
117
     *
118
     * @return $this
119
     */
120
    public function setClassName($className)
121
    {
122
        $this->className = $className;
123
124
        return $this;
125
    }
126
127
    /**
128
     * id объекта
129
     *
130
     * @return string
131
     */
132
    public function getObjectId()
133
    {
134
        return $this->objectId;
135
    }
136
137
    /**
138
     * Устанвливает id объекта
139
     *
140
     * @param string $objectId
141
     *
142
     * @return $this
143
     */
144
    public function setObjectId($objectId)
145
    {
146
        $this->objectId = $objectId;
147
148
        return $this;
149
    }
150
151
    /**
152
     * Псевдоним по которому можно обратиться к объекту
153
     *
154
     * @return string
155
     */
156
    public function getAlias()
157
    {
158
        return $this->alias;
159
    }
160
161
    /**
162
     * Устанавливает пседвоним по которому можно обратиться к объекту
163
     *
164
     * @param string $alias
165
     *
166
     * @return $this
167
     */
168
    public function setAlias($alias)
169
    {
170
        $this->alias = $alias;
171
172
        return $this;
173
    }
174
175
    /**
176
     * Возвращает все процессы wf,в которых участвует объект
177
     *
178
     * @return ArrayCollection|ExtEntry[]
179
     */
180
    public function getEntries()
181
    {
182
        return $this->entries;
183
    }
184
185
    /**
186
     * Добавляет процесс wf, в котором задействован объект
187
     *
188
     * @param ExtEntry $entry
189
     *
190
     * @return $this
191
     */
192
    public function addEntry(ExtEntry $entry)
193
    {
194
        if (!$this->getEntries()->contains($entry)) {
195
            $this->getEntries()->add($entry);
196
        }
197
198
        return $this;
199
    }
200
}
201