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.

Param::getDefault()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
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 __CLASS__ === $this->default ? 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 __CLASS__ !== $this->default;
49
    }
50
}
51