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 ( 861dcb...319287 )
by VEBER
11s
created

ClusterNode   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 36
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A retrieveClusterStatus() 0 4 1
A addANode() 0 4 1
A forciblyRemoveANode() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the KongAdminApi package.
5
 *
6
 * (c) Unikorp <https://github.com/unikorp>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Unikorp\KongAdminApi\Node;
13
14
use Psr\Http\Message\ResponseInterface;
15
use Unikorp\KongAdminApi\AbstractNode;
16
use Unikorp\KongAdminApi\Document\ClusterDocument as Document;
17
18
/**
19
 * cluster node
20
 *
21
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
22
 */
23
class ClusterNode extends AbstractNode
24
{
25
    /**
26
     * retrieve cluster status
27
     *
28
     * @return \Psr\Http\Message\ResponseInterface
29
     */
30 2
    public function retrieveClusterStatus(): ResponseInterface
31
    {
32 2
        return $this->get('/cluster');
33
    }
34
35
    /**
36
     * add a node
37
     *
38
     * @param \Unikorp\KongAdminApi\Document\ClusterDocument $document
39
     *
40
     * @return \Psr\Http\Message\ResponseInterface
41
     */
42 1
    public function addANode(Document $document): ResponseInterface
43
    {
44 1
        return $this->post('/cluster', $document);
45
    }
46
47
    /**
48
     * forcibly remove a node
49
     *
50
     * @param \Unikorp\KongAdminApi\Document\ClusterDocument $document
51
     *
52
     * @return \Psr\Http\Message\ResponseInterface
53
     */
54 2
    public function forciblyRemoveANode(Document $document): ResponseInterface
55
    {
56 2
        return $this->delete('/cluster', $document);
57
    }
58
}
59