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 ( 6ac76d...bfd754 )
by Cees-Jan
03:25
created

Version   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%
Metric Value
dl 0
loc 20
ccs 6
cts 6
cp 1
rs 10
wmc 1
lcom 0
cbo 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 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\Commands;
14
15
use React\Promise\PromiseInterface;
16
use function React\Promise\resolve;
17
use WyriHaximus\PhuninNode\ConnectionContext;
18
use WyriHaximus\PhuninNode\Node;
19
20
class Version implements CommandInterface
21
{
22
    use NodeAwareTrait;
23
24
    /**
25
     * Version message
26
     */
27
    const VERSION_MESSAGE = 'PhuninNode on %s version: %s';
28
29 2
    public function handle(ConnectionContext $context, string $line): PromiseInterface
30
    {
31 2
        return resolve([
32 2
            sprintf(
33 2
                static::VERSION_MESSAGE,
34 2
                $this->getNode()->getConfiguration()->getPair('hostname')->getValue(),
35 2
                Node::VERSION
36
            )
37
        ]);
38
    }
39
}
40