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.

ModuleOptions::setLogName()   A
last analyzed

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
     * @var string
19
     */
20
    const LOG_NAME = 'logName';
21
22
    /**
23
     * Наймспейс для сущностей.
24
     *
25
     * @var string
26
     */
27
    protected $rootEntityNamespace;
28
29
    /**
30
     * Карта доступа к сущностям
31
     *
32
     * @var array
33
     */
34
    protected $entityMap = [];
35
36
    /**
37
     * Метаданные для получения id процесса
38
     *
39
     * @var array
40
     */
41
    protected $workflowEntryToObjectMetadata = [];
42
43
    /**
44
     * Имя используемого логера
45
     *
46
     * @var string|null
47
     */
48
    protected $logName;
49
50
    /**
51
     * @return string
52
     */
53
    public function getRootEntityNamespace()
54
    {
55
        return $this->rootEntityNamespace;
56
    }
57
58
    /**
59
     * @param string $rootEntityNamespace
60
     *
61
     * @return $this
62
     */
63
    public function setRootEntityNamespace($rootEntityNamespace)
64
    {
65
        $this->rootEntityNamespace = $rootEntityNamespace;
66
67
        return $this;
68
    }
69
70
    /**
71
     * @return array
72
     */
73
    public function getEntityMap()
74
    {
75
        return $this->entityMap;
76
    }
77
78
    /**
79
     * @param array $entityMap
80
     *
81
     * @return $this
82
     */
83
    public function setEntityMap(array $entityMap = [])
84
    {
85
        $this->entityMap = $entityMap;
86
87
        return $this;
88
    }
89
90
    /**
91
     * Возвращает класс сущности по ее имени
92
     *
93
     * @param string $entity
94
     *
95
     * @return array|string
96
     */
97
    public function getEntityClassName($entity)
98
    {
99
        if (array_key_exists($entity, $this->entityMap)) {
100
            return $this->entityMap;
101
        }
102
103
        return $this->rootEntityNamespace . $entity;
104
    }
105
106
    /**
107
     * Метаданные для получения id процесса
108
     *
109
     * @return array
110
     */
111
    public function getWorkflowEntryToObjectMetadata()
112
    {
113
        return $this->workflowEntryToObjectMetadata;
114
    }
115
116
    /**
117
     * Устанавливает метаданные для получения id процесса
118
     *
119
     * @param array $workflowEntryToObjectMetadata
120
     *
121
     * @return $this
122
     */
123
    public function setWorkflowEntryToObjectMetadata(array $workflowEntryToObjectMetadata = [])
124
    {
125
        $this->workflowEntryToObjectMetadata = $workflowEntryToObjectMetadata;
126
127
        return $this;
128
    }
129
130
131
    /**
132
     * Имя используемого логера
133
     *
134
     * @return null|string
135
     */
136
    public function getLogName()
137
    {
138
        return $this->logName;
139
    }
140
141
    /**
142
     * Имя используемого логера
143
     *
144
     * @param null|string $logName
145
     *
146
     * @return $this
147
     */
148
    public function setLogName($logName)
149
    {
150
        $this->logName = $logName;
151
152
        return $this;
153
    }
154
}
155