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

JobExecution::cancel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
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\Deletable;
6
use OpenStack\Common\Resource\Listable;
7
use OpenStack\Common\Resource\OperatorResource;
8
use OpenStack\Common\Resource\Retrievable;
9
10
class JobExecution extends OperatorResource implements Listable, Retrievable, Deletable
11
{
12
    public $jobConfigs;
13
    public $isProtected;
14
    public $inputId;
15
    public $jobId;
16
    public $clusterId;
17
    public $createdAt;
18
    public $endTime;
19
    public $outputId;
20
    public $isPublic;
21
    public $updatedAt;
22
    public $returnCode;
23
    public $dataSourceUrls;
24
    public $tenantId;
25
    public $startTime;
26
    public $id;
27
    public $oozieJobId;
28
    public $info;
29
    public $createdTime;
30
    public $status;
31
    public $group;
32
    public $externalId;
33
    public $acl;
34
    public $run;
35
    public $appName;
36
    public $parentId;
37
    public $conf;
38
    public $appPath;
39
    public $toString;
40
    public $lastModTime;
41
    public $consoleUrl;
42
43
    protected $resourceKey = 'job_execution';
44
    protected $resourcesKey = 'job_executions';
45
46
    protected $aliases = [
47
                'job_configs'      => 'jobConfigs',
48
                'is_protected'     => 'isProtected',
49
                'input_id'         => 'inputId',
50
                'job_id'           => 'jobId',
51
                'cluster_id'       => 'clusterId',
52
                'created_at'       => 'createdAt',
53
                'end_time'         => 'endTime',
54
                'output_id'        => 'outputId',
55
                'is_public'        => 'isPublic',
56
                'updated_at'       => 'updatedAt',
57
                'reutrn_code'      => 'returnCode',
58
                'data_source_urls' => 'dataSourceUrls',
59
                'tenant_id'        => 'tenantId',
60
                'start_time'       => 'startTime',
61
                'oozie_job_id'     => 'oozieJobId',
62
    ];
63
64
    public function retrieve()
65
    {
66
        $response = $this->execute($this->api->getJobExecution(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method getJobExecution() 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...
67
        $this->populateFromResponse($response);
68
    }
69
70
    public function delete()
71
    {
72
        $this->execute($this->api->deleteJobExecution(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method deleteJobExecution() 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...
73
    }
74
75
    public function update()
76
    {
77
        $response = $this->execute($this->api->patchJobExecution(), $this->getAttrs(['id', 'isPublic', 'isProtected']));
0 ignored issues
show
Bug introduced by
The method patchJobExecution() 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...
78
        $this->populateFromResponse($response);
79
    }
80
81
    public function cancel()
82
    {
83
        $response = $this->execute($this->api->cancelJob(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method cancelJob() 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...
84
        $this->populateFromResponse($response);
85
    }
86
87
    public function refreshStatus()
88
    {
89
        $response = $this->execute($this->api->refreshStatus(), $this->getAttrs(['id']));
0 ignored issues
show
Bug introduced by
The method refreshStatus() 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...
90
        $this->populateFromResponse($response);
91
    }
92
}
93