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   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 39
ccs 13
cts 13
cp 1
rs 10
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setDisplayName() 0 5 1
A setName() 0 5 1
A setType() 0 5 1
A getRequiredFields() 0 7 2
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