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

ExtEntry::addObjectInfo()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
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\AbstractEntry;
9
use Doctrine\ORM\Mapping as ORM;
10
use Doctrine\Common\Collections\ArrayCollection;
11
12
/**
13
 * Class Entry
14
 *
15
 * @ORM\Entity()
16
 * @ORM\Table(name="wf_entry")
17
 *
18
 * @package OldTown\Workflow\ZF2\Toolkit\Entity\DoctrineWorkflowStory
19
 */
20
class ExtEntry extends AbstractEntry
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
     * ExtEntry constructor.
42
     */
43
    public function __construct()
44
    {
45
        parent::__construct();
46
        $this->objectsInfo = new ArrayCollection();
47
    }
48
49
50
    /**
51
     * Возвращает инмформацию о всех объектах привязанных к данному процессу
52
     *
53
     * @return ArrayCollection|ObjectInfo[]
54
     */
55
    public function getObjectsInfo()
56
    {
57
        return $this->objectsInfo;
58
    }
59
60
    /**
61
     * Добавляет информацию о объекте который привязан к процессу wf
62
     *
63
     * @param ObjectInfo $objectInfo
64
     *
65
     * @return $this
66
     */
67
    public function addObjectInfo(ObjectInfo $objectInfo)
68
    {
69
        if (!$this->getObjectsInfo()->contains($objectInfo)) {
70
            $this->getObjectsInfo()->add($objectInfo);
71
        }
72
73
        return $this;
74
    }
75
}
76