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.

MultiGraph   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 77
ccs 0
cts 31
cp 0
rs 10
wmc 7
lcom 0
cbo 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A setNode() 0 4 1
A getSlug() 0 4 1
A getConfiguration() 0 4 1
A getValues() 0 4 1
A getCategorySlug() 0 4 1
A getCapabilities() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
/*
5
 * This file is part of PhuninNode.
6
 *
7
 ** (c) 2013 - 2016 Cees-Jan Kiewiet
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace WyriHaximus\PhuninNode\Plugins;
14
15
use React\Promise\PromiseInterface;
16
use WyriHaximus\PhuninNode\Node;
17
use WyriHaximus\PhuninNode\PluginInterface;
18
use function React\Promise\resolve;
19
20
/**
21
 * Class MultiGraph
22
 * @package WyriHaximus\PhuninNode\Plugins
23
 */
24
class MultiGraph implements PluginInterface
25
{
26
    /**
27
     * @var Node
28
     */
29
    private $node;
30
31
    /**
32
     * @var string
33
     */
34
    protected $slug;
35
36
    /**
37
     * @var string
38
     */
39
    protected $category;
40
41
    /**
42
     * @param string $slug
43
     * @param string $category
44
     */
45
    public function __construct(string $slug, string $category)
46
    {
47
        $this->slug = $slug;
48
        $this->category = $category;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function setNode(Node $node)
55
    {
56
        $this->node = $node;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getSlug(): string
63
    {
64
        return $this->slug;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70
    public function getCategorySlug(): string
71
    {
72
        return $this->category;
73
    }
74
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function getConfiguration(): PromiseInterface
79
    {
80
        return resolve([]);
81
    }
82
83
    /**
84
     * {@inheritdoc}
85
     */
86
    public function getValues(): PromiseInterface
87
    {
88
        return resolve([]);
89
    }
90
91
    /**
92
     * {@inheritdoc}
93
     */
94
    public function getCapabilities(): array
95
    {
96
        return [
97
            'multigraph'
98
        ];
99
    }
100
}
101