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 ( a3afb5...70d7cd )
by Андрей
03:27
created

Entry::getObjectsInfo()   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 OldTown\Workflow\Spi\Doctrine\Entity\Entry as BaseEntry;
9
use Doctrine\ORM\Mapping as ORM;
10
use Doctrine\Common\Collections\ArrayCollection;
11
12
/**
13
 * Class Entry
14
 *
15
 * @ORM\Entity()
16
 *
17
 * @package OldTown\Workflow\ZF2\Toolkit\Entity\DoctrineWorkflowStory
18
 */
19
class Entry extends BaseEntry
20
{
21
22
    /**
23
     * Информация о объектах которые привязанны к процессу
24
     *
25
     * @ORM\ManyToMany(targetEntity="ObjectInfo", inversedBy="entries")
26
     * @ORM\JoinTable(
27
     *     name="wf_entry_to_object",
28
     *     joinColumns={
29
     *         @ORM\JoinColumn(name="entry_id", referencedColumnName="id")
30
     *     },
31
     *     inverseJoinColumns={
32
     *         @ORM\JoinColumn(name="object_id", referencedColumnName="id")
33
     *     }
34
     * )
35
     *
36
     * @var ObjectInfo[]|ArrayCollection
37
     */
38
    protected $objectsInfo;
39
40
    /**
41
     * Возвращает инмформацию о всех объектах привязанных к данному процессу
42
     *
43
     * @return ArrayCollection|ObjectInfo[]
44
     */
45
    public function getObjectsInfo()
46
    {
47
        return $this->objectsInfo;
48
    }
49
50
    /**
51
     * Добавляет информацию о объекте который привязан к процессу wf
52
     *
53
     * @param ObjectInfo $objectInfo
54
     *
55
     * @return $this
56
     */
57
    public function addObjectInfo(ObjectInfo $objectInfo)
58
    {
59
        $objectInfo->addEntry($this);
60
        if (!$this->getObjectsInfo()->contains($objectInfo)) {
61
            $this->getObjectsInfo()->add($objectInfo);
62
        }
63
64
        return $this;
65
    }
66
}
67