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 ( 709c6a...063dd9 )
by Robert
32:19 queued 28:25
created

Param   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getDefault() 0 4 2
A getName() 0 4 1
A getDescription() 0 4 1
A hasDefault() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the "php-ipfs" package.
7
 *
8
 * (c) Robert Schönthal <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace IPFS\Annotation;
15
16
class Param
17
{
18
    private $name;
19
20
    private $description;
21
22
    private $default;
23
24 8
    public function __construct(string $name, string $description, $default = __CLASS__)
25
    {
26 8
        $this->name = $name;
27 8
        $this->description = $description;
28 8
        $this->default = $default;
29 8
    }
30
31 7
    public function getDefault()
32
    {
33 7
        return $this->default === __CLASS__ ? null : $this->default;
34
    }
35
36 2
    public function getName(): string
37
    {
38 2
        return $this->name;
39
    }
40
41 4
    public function getDescription(): string
42
    {
43 4
        return $this->description;
44
    }
45
46 6
    public function hasDefault(): bool
47
    {
48 6
        return $this->default !== __CLASS__;
49
    }
50
}
51