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   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 55
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 6 1
A setType() 0 6 1
A setDisplayName() 0 6 1
A getRequiredFields() 0 9 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
     * @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