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 ( 4095d1...89bae3 )
by Андрей
04:02
created

ModuleOptions::setWorkflowEntryToObjectMetadata()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
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\Options;
7
8
use Zend\Stdlib\AbstractOptions;
9
10
/**
11
 * Class ModuleOptions
12
 *
13
 * @package OldTown\Workflow\ZF2\Toolkit\Options
14
 */
15
class ModuleOptions extends AbstractOptions
16
{
17
    /**
18
     * Наймспейс для сущностей.
19
     *
20
     * @var string
21
     */
22
    protected $rootEntityNamespace;
23
24
    /**
25
     * Карта доступа к сущностям
26
     *
27
     * @var array
28
     */
29
    protected $entityMap = [];
30
31
    /**
32
     * Метаданные для получения id процесса
33
     *
34
     * @var array
35
     */
36
    protected $workflowEntryToObjectMetadata = [];
37
38
    /**
39
     * @return string
40
     */
41
    public function getRootEntityNamespace()
42
    {
43
        return $this->rootEntityNamespace;
44
    }
45
46
    /**
47
     * @param string $rootEntityNamespace
48
     *
49
     * @return $this
50
     */
51
    public function setRootEntityNamespace($rootEntityNamespace)
52
    {
53
        $this->rootEntityNamespace = $rootEntityNamespace;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @return array
60
     */
61
    public function getEntityMap()
62
    {
63
        return $this->entityMap;
64
    }
65
66
    /**
67
     * @param array $entityMap
68
     *
69
     * @return $this
70
     */
71
    public function setEntityMap(array $entityMap = [])
72
    {
73
        $this->entityMap = $entityMap;
74
75
        return $this;
76
    }
77
78
    /**
79
     * Возвращает класс сущности по ее имени
80
     *
81
     * @param string $entity
82
     *
83
     * @return array|string
84
     */
85
    public function getEntityClassName($entity)
86
    {
87
        if (array_key_exists($entity, $this->entityMap)) {
88
            return $this->entityMap;
89
        }
90
91
        return $this->rootEntityNamespace . $entity;
92
    }
93
94
    /**
95
     * Метаданные для получения id процесса
96
     *
97
     * @return array
98
     */
99
    public function getWorkflowEntryToObjectMetadata()
100
    {
101
        return $this->workflowEntryToObjectMetadata;
102
    }
103
104
    /**
105
     * Устанавливает метаданные для получения id процесса
106
     *
107
     * @param array $workflowEntryToObjectMetadata
108
     *
109
     * @return $this
110
     */
111
    public function setWorkflowEntryToObjectMetadata(array $workflowEntryToObjectMetadata = [])
112
    {
113
        $this->workflowEntryToObjectMetadata = $workflowEntryToObjectMetadata;
114
115
        return $this;
116
    }
117
}
118