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
Pull Request — master (#157)
by
unknown
01:44
created

Plugin::retrieveDetails()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace OpenStack\DataProcessing\v1\Models;
4
5
use OpenStack\Common\Resource\Listable;
6
use OpenStack\Common\Resource\OperatorResource;
7
use OpenStack\Common\Resource\Retrievable;
8
use OpenStack\Common\Transport\Utils;
9
10
class Plugin extends OperatorResource implements Listable, Retrievable
11
{
12
    public $description;
13
    public $versions;
14
    public $versionLabels;
15
    public $title;
16
    public $pluginLabels;
17
    public $name;
18
    public $tenantId;
19
20
    protected $resourceKey = 'plugin';
21
    protected $resourcesKey = 'plugins';
22
23
    protected $aliases = [
24
            'version_labels' => 'versionLabels',
25
            'plugin_labels'  => 'pluginLabels',
26
            'tenant_id'      => 'tenantId',
27
            'plugin_name'    => 'name',
28
    ];
29
30
    public function retrieve()
31
    {
32
        $response = $this->execute($this->api->getPlugin(), $this->getAttrs(['name']));
0 ignored issues
show
Bug introduced by
The method getPlugin() does not seem to exist on object<OpenStack\Common\Api\ApiInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
33
        $this->populateFromResponse($response);
34
    }
35
36
    public function retrieveDetails()
37
    {
38
        $response = $this->execute($this->api->getPluginVersion(), $this->getAttrs(['name', 'versions']));
0 ignored issues
show
Bug introduced by
The method getPluginVersion() does not seem to exist on object<OpenStack\Common\Api\ApiInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
39
40
        return Utils::jsonDecode($response)['plugin'];
41
    }
42
43
    public function update()
44
    {
45
        $response = $this->execute($this->api->patchPlugin(), $this->getAttrs(['name', 'pluginLabels', 'versionLabels']));
0 ignored issues
show
Bug introduced by
The method patchPlugin() does not seem to exist on object<OpenStack\Common\Api\ApiInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
46
        $this->populateFromResponse($response);
47
    }
48
}
49