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

DataSource   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 48
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A retrieve() 0 5 1
A delete() 0 4 1
A update() 0 5 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
11
class DataSource extends OperatorResource implements Listable, Retrievable, Creatable, Deletable
12
{
13
    public $description;
14
    public $url;
15
    public $tenantId;
16
    public $createdAt;
17
    public $updatedAt;
18
    public $isProtected;
19
    public $isPublic;
20
    public $type;
21
    public $id;
22
    public $name;
23
24
    protected $resourceKey = 'data_source';
25
    protected $resourcesKey = 'data_sources';
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 create(array $userOptions): Creatable
36
    {
37
        $response = $this->execute($this->api->postDataSource(), $userOptions);
0 ignored issues
show
Bug introduced by
The method postDataSource() 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
39
        return $this->populateFromResponse($response);
40
    }
41
42
    public function retrieve()
43
    {
44
        $response = $this->execute($this->api->getDataSource(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method getDataSource() 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...
45
        $this->populateFromResponse($response);
46
    }
47
48
    public function delete()
49
    {
50
        $this->execute($this->api->deleteDataSource(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method deleteDataSource() 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->putDataSource(), $this->getAttrs(['id', 'description', 'name', 'isPublic', 'isProtected', 'url', 'type']));
0 ignored issues
show
Bug introduced by
The method putDataSource() 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