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

JobBinary   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 54
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A retrieve() 0 5 1
A create() 0 6 1
A delete() 0 4 1
A update() 0 5 1
A downloadData() 0 6 1
1
<?php
2
3
namespace OpenStack\DataProcessing\v1\Models;
4
5
use OpenStack\Common\Resource\Creatable;
6
use OpenStack\Common\Resource\Deletable;
7
use OpenStack\Common\Resource\Listable;
8
use OpenStack\Common\Resource\OperatorResource;
9
use OpenStack\Common\Resource\Retrievable;
10
use Psr\Http\Message\StreamInterface;
11
12
class JobBinary extends OperatorResource implements Listable, Retrievable, Creatable, Deletable
13
{
14
    public $description;
15
    public $url;
16
    public $tenantId;
17
    public $createdAt;
18
    public $updatedAt;
19
    public $isProtected;
20
    public $isPublic;
21
    public $id;
22
    public $name;
23
24
    protected $resourceKey = 'job_binary';
25
    protected $resourcesKey = 'binaries';
26
27
    protected $aliases = [
28
        'tenant_id'    => 'tenantId',
29
        'created_at'   => 'createdAt',
30
        'updated_at'   => 'updatedAt',
31
        'is_protected' => 'isProtected',
32
        'is_public'    => 'isPublic',
33
    ];
34
35
    public function retrieve()
36
    {
37
        $response = $this->execute($this->api->getJobBinary(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method getJobBinary() 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...
38
        $this->populateFromResponse($response);
39
    }
40
41
    public function create(array $userOptions): Creatable
42
    {
43
        $response = $this->execute($this->api->postJobBinary(), $userOptions);
0 ignored issues
show
Bug introduced by
The method postJobBinary() 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...
44
45
        return $this->populateFromResponse($response);
46
    }
47
48
    public function delete()
49
    {
50
        $this->execute($this->api->deleteJobBinary(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method deleteJobBinary() 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...
51
    }
52
53
    public function update()
54
    {
55
        $response = $this->execute($this->api->putJobBinary(), $this->getAttrs(['id', 'url', 'name', 'isPublic', 'isProtected', 'description']));
0 ignored issues
show
Bug introduced by
The method putJobBinary() 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...
56
        $this->populateFromResponse($response);
57
    }
58
59
    public function downloadData(): StreamInterface
60
    {
61
        $response = $this->executeWithState($this->api->getJobBinaryData());
0 ignored issues
show
Bug introduced by
The method getJobBinaryData() 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...
62
63
        return $response->getBody();
64
    }
65
}
66