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 ( 124e4f...793085 )
by Dmitri
02:20
created

Command::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Annotation;
6
7
use RuntimeException;
8
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface;
0 ignored issues
show
Bug introduced by
The type Sensio\Bundle\FrameworkE...\ConfigurationInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * @Annotation
12
 */
13
class Command implements ConfigurationInterface
14
{
15
    private $data;
16
17
    public function __construct(array $data)
18
    {
19
        if (isset($data['value'])) {
20
            $data['class'] = $data['value'];
21
        }
22
23
        if (empty($data['class'])) {
24
            throw new RuntimeException(sprintf('Key "class" is not defined for annotation "@%s"', __CLASS__));
25
        }
26
27
        $this->data = $data;
28
    }
29
30
    public function className(): string
31
    {
32
        return $this->data['class'];
33
    }
34
35
    public function validate(): bool
36
    {
37
        return $this->data['validate'] ?? false;
38
    }
39
40
    public function getAliasName(): string
41
    {
42
        return 'command';
43
    }
44
45
    public function allowArray(): bool
46
    {
47
        return false;
48
    }
49
}
50