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.

Code Duplication    Length = 73-73 lines in 2 locations

src/Node/Api.php 1 location

@@ 23-95 (lines=73) @@
20
 *
21
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
22
 */
23
class Api extends AbstractNode
24
{
25
    /**
26
     * add api
27
     *
28
     * @param \Unikorp\KongAdminApi\Document\Api $document
29
     *
30
     * @return \Psr\Http\Message\ResponseInterface
31
     */
32
    public function addApi(Document $document): ResponseInterface
33
    {
34
        return $this->post('/apis/', $document);
35
    }
36
37
    /**
38
     * retrieve api
39
     *
40
     * @param string $nameOrId
41
     *
42
     * @return \Psr\Http\Message\ResponseInterface
43
     */
44
    public function retrieveApi(string $nameOrId): ResponseInterface
45
    {
46
        return $this->get(sprintf('/apis/%1$s', $nameOrId));
47
    }
48
49
    /**
50
     * list apis
51
     *
52
     * @return \Psr\Http\Message\ResponseInterface
53
     */
54
    public function listApis(): ResponseInterface
55
    {
56
        return $this->get('/apis/');
57
    }
58
59
    /**
60
     * update api
61
     *
62
     * @param string $nameOrId
63
     * @param \Unikorp\KongAdminApi\Document\Api $document
64
     *
65
     * @return \Psr\Http\Message\ResponseInterface
66
     */
67
    public function updateApi(string $nameOrId, Document $document): ResponseInterface
68
    {
69
        return $this->patch(sprintf('/apis/%1$s', $nameOrId), $document);
70
    }
71
72
    /**
73
     * update or create api
74
     *
75
     * @param \Unikorp\KongAdminApi\Document\Api $document
76
     *
77
     * @return \Psr\Http\Message\ResponseInterface
78
     */
79
    public function updateOrCreateApi(Document $document): ResponseInterface
80
    {
81
        return $this->put('/apis/', $document);
82
    }
83
84
    /**
85
     * delete api
86
     *
87
     * @param string $nameOrId
88
     *
89
     * @return \Psr\Http\Message\ResponseInterface
90
     */
91
    public function deleteApi(string $nameOrId): ResponseInterface
92
    {
93
        return $this->delete(sprintf('/apis/%1$s', $nameOrId));
94
    }
95
}
96

src/Node/Consumer.php 1 location

@@ 23-95 (lines=73) @@
20
 *
21
 * @author VEBER Arnaud <https://github.com/VEBERArnaud>
22
 */
23
class Consumer extends AbstractNode
24
{
25
    /**
26
     * create consumer
27
     *
28
     * @param \Unikorp\KongAdminApi\Document\Consumer $document
29
     *
30
     * @return \Psr\Http\Message\ResponseInterface
31
     */
32
    public function createConsumer(Document $document): ResponseInterface
33
    {
34
        return $this->post('/consumers/', $document);
35
    }
36
37
    /**
38
     * retrieve consumer
39
     *
40
     * @param string $usernameOrId
41
     *
42
     * @return \Psr\Http\Message\ResponseInterface
43
     */
44
    public function retrieveConsumer(string $usernameOrId): ResponseInterface
45
    {
46
        return $this->get(sprintf('/consumers/%1$s', $usernameOrId));
47
    }
48
49
    /**
50
     * list consumers
51
     *
52
     * @return \Psr\Http\Message\ResponseInterface
53
     */
54
    public function listConsumers(): ResponseInterface
55
    {
56
        return $this->get('/consumers/');
57
    }
58
59
    /**
60
     * update consumer
61
     *
62
     * @param string $usernameOrId
63
     * @param \Unikorp\KongAdminApi\Document\Consumer $document
64
     *
65
     * @return \Psr\Http\Message\ResponseInterface
66
     */
67
    public function updateConsumer(string $usernameOrId, Document $document): ResponseInterface
68
    {
69
        return $this->patch(sprintf('/consumers/%1$s', $usernameOrId), $document);
70
    }
71
72
    /**
73
     * update or create consumer
74
     *
75
     * @param \Unikorp\KongAdminApi\Document\Consumer $document
76
     *
77
     * @return \Psr\Http\Message\ResponseInterface
78
     */
79
    public function updateOrCreateConsumer(Document $document): ResponseInterface
80
    {
81
        return $this->put('/consumers/', $document);
82
    }
83
84
    /**
85
     * delete consumer
86
     *
87
     * @param string $usernameOrId
88
     *
89
     * @return \Psr\Http\Message\ResponseInterface
90
     */
91
    public function deleteConsumer(string $usernameOrId): ResponseInterface
92
    {
93
        return $this->delete(sprintf('/consumers/%1$s', $usernameOrId));
94
    }
95
}
96