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.

ConfigurationServiceOptions::setName()   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
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\ZF2\Options;
7
8
use Zend\Stdlib\AbstractOptions;
9
10
/**
11
 * Class ConfigurationServiceOptions
12
 *
13
 * @package OldTown\Workflow\ZF2\Options
14
 */
15
class ConfigurationServiceOptions  extends AbstractOptions
0 ignored issues
show
Coding Style introduced by
Expected 1 space after class name; 2 found
Loading history...
Coding Style introduced by
Expected 1 space before extends keyword; 2 found
Loading history...
16
{
17
    /**
18
     * Имя сервиса
19
     *
20
     * @var string
21
     */
22
    protected $name;
23
24
    /**
25
     * Настройки сервиса
26
     *
27
     * @var array
28
     */
29
    protected $options = [];
30
31
    /**
32
     * Возвращает имя сервиса
33
     *
34
     * @return string
35
     *
36
     * @throws Exception\InvalidServiceConfigException
37
     */
38
    public function getName()
39
    {
40
        if (!null === $this->name) {
41
            $errMsg = 'service name not exists';
42
            throw new Exception\InvalidServiceConfigException($errMsg);
43
        }
44
        return $this->name;
45
    }
46
47
    /**
48
     * Устанавливает имя сервиса
49
     *
50
     * @param string $name
51
     *
52
     * @return $this
53
     */
54
    public function setName($name)
55
    {
56
        $this->name = (string)$name;
57
58
        return $this;
59
    }
60
61
    /**
62
     * Возвращает настройки сервиса
63
     *
64
     * @return array
65
     */
66
    public function getOptions()
67
    {
68
        return $this->options;
69
    }
70
71
    /**
72
     * Устанавливает настройки сервиса
73
     *
74
     * @param array $options
75
     *
76
     * @return $this
77
     */
78
    public function setOptions(array $options)
79
    {
80
        $this->options = $options;
81
82
        return $this;
83
    }
84
}
85