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.

TeamBuilder::setType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
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
     * Set the Team name.
13
     */
14 1
    public function setName(string $name): self
15
    {
16 1
        $this->params['name'] = $name;
17
18 1
        return $this;
19
    }
20
21
    /**
22
     * Set the Team type.
23
     */
24 1
    public function setType(string $type): self
25
    {
26 1
        $this->params['type'] = $type;
27
28 1
        return $this;
29
    }
30
31
    /**
32
     * Set the display name.
33
     */
34 1
    public function setDisplayName(string $diplayName): self
35
    {
36 1
        $this->params['display_name'] = $diplayName;
37
38 1
        return $this;
39
    }
40
41 4
    protected function getRequiredFields(string $buildType = self::BUILD_FOR_CREATE): array
42
    {
43
        switch ($buildType) {
44 4
            case self::BUILD_FOR_CREATE:
45 2
                return ['type', 'name', 'display_name'];
46
            default:
47 2
                return [];
48
        }
49
    }
50
}
51