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 ( 89fb33...cd256e )
by Ema
02:19
created

TeamBuilder::setType()   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
declare(strict_types=1);
4
5
namespace Pnz\MattermostClient\Model\Team;
6
7
use Pnz\MattermostClient\Model\ModelBuilder;
8
9
class TeamBuilder extends ModelBuilder
10
{
11
    /**
12
     * @param $name
13
     *
14
     * @return $this
15
     */
16 1
    public function setName($name)
17
    {
18 1
        $this->params['name'] = $name;
19
20 1
        return $this;
21
    }
22
23
    /**
24
     * Set the Team type.
25
     *
26
     * @param $type
27
     *
28
     * @return $this
29
     */
30 1
    public function setType($type)
31
    {
32 1
        $this->params['type'] = $type;
33
34 1
        return $this;
35
    }
36
37
    /**
38
     * Set the display name.
39
     *
40
     * @param $diplayName
41
     *
42
     * @return $this
43
     */
44 1
    public function setDisplayName($diplayName)
45
    {
46 1
        $this->params['display_name'] = $diplayName;
47
48 1
        return $this;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54 4
    protected function getRequiredFields($buildType = self::BUILD_FOR_CREATE)
55
    {
56
        switch ($buildType) {
57 4
            case self::BUILD_FOR_CREATE:
58 2
                return ['type', 'name', 'display_name'];
59
            default:
60 2
                return [];
61
        }
62
    }
63
}
64