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::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 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