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 — master ( 45f3ef...b20185 )
by Sascha
8s
created

Choice::setChoices()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
namespace Dkd\PhpCmis\DataObjects;
3
4
/**
5
 * This file is part of php-cmis-lib.
6
 *
7
 * (c) Sascha Egerer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
use Dkd\PhpCmis\Definitions\ChoiceInterface;
14
use Dkd\PhpCmis\Traits\TypeHelperTrait;
15
16
/**
17
 * Choice implementation.
18
 */
19
class Choice implements ChoiceInterface
20
{
21
    use TypeHelperTrait;
22
23
    /**
24
     * @var string
25
     */
26
    protected $displayName = '';
27
28
    /**
29
     * @var ChoiceInterface[]|string[]|integer[]|boolean[]|float[]|\DateTime[]
30
     */
31
    protected $value = array();
32
33
    /**
34
     * @var ChoiceInterface[]
35
     */
36
    protected $choices = array();
37
38
    /**
39
     * @return ChoiceInterface[]
40
     */
41 1
    public function getChoices()
42
    {
43 1
        return $this->choices;
44
    }
45
46
    /**
47
     * @param ChoiceInterface[] $choices
48
     */
49 3
    public function setChoices(array $choices)
50
    {
51 3
        foreach ($choices as $value) {
52 3
            $this->checkType('\\Dkd\\PhpCmis\\Definitions\\ChoiceInterface', $value);
53 3
        }
54
55 2
        $this->choices = $choices;
56 2
    }
57
58
    /**
59
     * Return the display name of the choice value.
60
     *
61
     * @return string
62
     */
63 1
    public function getDisplayName()
64
    {
65 1
        return $this->displayName;
66
    }
67
68
    /**
69
     * Sets the display name of the choice value.
70
     *
71
     * @return string $displayName
72
     */
73 2
    public function setDisplayName($displayName)
74
    {
75 2
        $this->checkType('string', $displayName);
76 2
        $this->displayName = $displayName;
77 2
    }
78
79
    /**
80
     * Return the value of the choice value.
81
     *
82
     * @return ChoiceInterface[]|string[]|integer[]|boolean[]|float[]|\DateTime[]
83
     */
84 1
    public function getValue()
85
    {
86 1
        return $this->value;
87
    }
88
89
    /**
90
     * Sets the value of the choice value.
91
     *
92
     * @param ChoiceInterface[]|string[]|integer[]|boolean[]|float[]|\DateTime[] $value
93
     */
94 2
    public function setValue(array $value)
95
    {
96 2
        $this->value = $value;
97 2
    }
98
}
99