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.

ManagerOptions   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 101
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 101
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfiguration() 0 8 2
A setConfiguration() 0 6 1
A getName() 0 4 1
A setName() 0 6 1
A getWorkflows() 0 4 1
A setWorkflows() 0 6 1
1
<?php
2
/**
3
 * @link https://github.com/old-town/workflow-zf2
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Options;
7
8
use Zend\Stdlib\AbstractOptions;
9
use OldTown\Workflow\Basic\BasicWorkflow;
10
11
12
/**
13
 * Class ManagerOptions
14
 *
15
 * @package OldTown\Workflow\ZF2\Options
16
 */
17
class ManagerOptions extends AbstractOptions
18
{
19
    /**
20
     * Имя конфигурации для данного менеджера workflow
21
     *
22
     * @var string
23
     */
24
    protected $configuration;
25
26
    /**
27
     * Имя класса менеджера workflow
28
     *
29
     * @var string
30
     */
31
    protected $name = BasicWorkflow::class;
32
33
    /**
34
     * Зарегестрированные workflows
35
     *
36
     * @var array
37
     */
38
    protected $workflows = [];
39
40
    /**
41
     * Возвращает имя конфигурации для данного менеджера workflow
42
     *
43
     * @return string
44
     *
45
     * @throws Exception\InvalidConfigurationNameException
46
     */
47
    public function getConfiguration()
48
    {
49
        if (null === $this->configuration) {
50
            $errMsg = 'no attribute \'configuration\'';
51
            throw new Exception\InvalidConfigurationNameException($errMsg);
52
        }
53
        return $this->configuration;
54
    }
55
56
    /**
57
     * Устанавливает имя конфигурации для данного менеджера workflow
58
     *
59
     * @param string $configuration
60
     *
61
     * @return $this
62
     */
63
    public function setConfiguration($configuration)
64
    {
65
        $this->configuration = $configuration;
66
67
        return $this;
68
    }
69
70
    /**
71
     * Возвращает имя класса менеджера workflow
72
     *
73
     * @return string
74
     */
75
    public function getName()
76
    {
77
        return $this->name;
78
    }
79
80
    /**
81
     * Устанавливает имя класса менеджера workflow
82
     *
83
     * @param string $name
84
     *
85
     * @return $this
86
     */
87
    public function setName($name)
88
    {
89
        $this->name = $name;
90
91
        return $this;
92
    }
93
94
    /**
95
     * Возвращает зарегестрированные workflows
96
     *
97
     * @return array
98
     */
99
    public function getWorkflows()
100
    {
101
        return $this->workflows;
102
    }
103
104
    /**
105
     * Устанавливает зарегестрированные workflows
106
     *
107
     * @param array $workflows
108
     *
109
     * @return $this
110
     */
111
    public function setWorkflows(array $workflows)
112
    {
113
        $this->workflows = $workflows;
114
115
        return $this;
116
    }
117
}
118