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 ( cde5b2...a2c9c7 )
by VEBER
13s
created

Upstream::setOrderlist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the KongAdminApi package.
5
 *
6
 * (c) Unikorp <https://github.com/unikorp>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Unikorp\KongAdminApi\Document;
13
14
use Unikorp\KongAdminApi\AbstractDocument;
15
16
/**
17
 * upstream
18
 *
19
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
20
 */
21
class Upstream extends AbstractDocument
22
{
23
    /**
24
     * name
25
     * @var string $name
26
     */
27
    protected $name = null;
28
29
    /**
30
     * slots
31
     * @var int $slots
32
     */
33
    protected $slots = 1000;
34
35
    /**
36
     * orderlist
37
     * @var array $orderlist
38
     */
39
    protected $orderlist = [];
40
41
    /**
42
     * set name
43
     *
44
     * @param string $name
45
     *
46
     * @return this
47
     */
48 1
    public function setName(string $name): self
49
    {
50 1
        $this->name = $name;
51
52 1
        return $this;
53
    }
54
55
    /**
56
     * get name
57
     *
58
     * @return string
59
     */
60 1
    public function getName(): string
61
    {
62 1
        return $this->name;
63
    }
64
65
    /**
66
     * set slots
67
     *
68
     * @param int $slots
69
     *
70
     * @return this
71
     */
72 1
    public function setSlots(int $slots): self
73
    {
74 1
        $this->slots = $slots;
75
76 1
        return $this;
77
    }
78
79
    /**
80
     * get slots
81
     *
82
     * @return int
83
     */
84 1
    public function getSlots(): int
85
    {
86 1
        return $this->slots;
87
    }
88
89
    /**
90
     * set orderlist
91
     *
92
     * @param array $orderlist
93
     *
94
     * @return this
95
     */
96 1
    public function setOrderlist(array $orderlist): self
97
    {
98 1
        $this->orderlist = $orderlist;
99
100 1
        return $this;
101
    }
102
103
    /**
104
     * get orderlist
105
     *
106
     * @return array
107
     */
108 1
    public function getOrderlist(): array
109
    {
110 1
        return $this->orderlist;
111
    }
112
113
    /**
114
     * get fields
115
     *
116
     * @return array
117
     */
118 1
    protected function getFields(): array
119
    {
120
        return [
121 1
            'name',
122
            'slots',
123
            'orderlist',
124
        ];
125
    }
126
}
127