@@ 9-147 (lines=139) @@ | ||
6 | use DateTimeInterface; |
|
7 | use WyriHaximus\ApiClient\Resource\TransportAwareTrait; |
|
8 | ||
9 | abstract class Build implements BuildInterface |
|
10 | { |
|
11 | use TransportAwareTrait; |
|
12 | ||
13 | /** |
|
14 | * @var int |
|
15 | */ |
|
16 | protected $id; |
|
17 | ||
18 | /** |
|
19 | * @var int |
|
20 | */ |
|
21 | protected $repository_id; |
|
22 | ||
23 | /** |
|
24 | * @var int |
|
25 | */ |
|
26 | protected $commit_id; |
|
27 | ||
28 | /** |
|
29 | * @var string |
|
30 | */ |
|
31 | protected $number; |
|
32 | ||
33 | /** |
|
34 | * @var bool |
|
35 | */ |
|
36 | protected $pull_request; |
|
37 | ||
38 | /** |
|
39 | * @var string |
|
40 | */ |
|
41 | protected $pull_request_title; |
|
42 | ||
43 | /** |
|
44 | * @var int |
|
45 | */ |
|
46 | protected $pull_request_number; |
|
47 | ||
48 | /** |
|
49 | * @var array |
|
50 | */ |
|
51 | protected $config = []; |
|
52 | ||
53 | /** |
|
54 | * @var string |
|
55 | */ |
|
56 | protected $state; |
|
57 | ||
58 | /** |
|
59 | * @var DateTimeInterface |
|
60 | */ |
|
61 | protected $started_at; |
|
62 | ||
63 | /** |
|
64 | * @var DateTimeInterface |
|
65 | */ |
|
66 | protected $finished_at; |
|
67 | ||
68 | /** |
|
69 | * @var int |
|
70 | */ |
|
71 | protected $duration; |
|
72 | ||
73 | /** |
|
74 | * @var int[] |
|
75 | */ |
|
76 | protected $job_ids = []; |
|
77 | ||
78 | public function id() : int |
|
79 | { |
|
80 | return $this->id; |
|
81 | } |
|
82 | ||
83 | public function repositoryId() : int |
|
84 | { |
|
85 | return $this->repository_id; |
|
86 | } |
|
87 | ||
88 | public function commitId() : int |
|
89 | { |
|
90 | return $this->commit_id; |
|
91 | } |
|
92 | ||
93 | public function number() : int |
|
94 | { |
|
95 | return $this->number; |
|
96 | } |
|
97 | ||
98 | public function pullRequest() : bool |
|
99 | { |
|
100 | return $this->pull_request; |
|
101 | } |
|
102 | ||
103 | public function pullRequestTitle() : string |
|
104 | { |
|
105 | return $this->pull_request_title; |
|
106 | } |
|
107 | ||
108 | public function pullRequestNumber() : int |
|
109 | { |
|
110 | return $this->pull_request_number; |
|
111 | } |
|
112 | ||
113 | public function config() : array |
|
114 | { |
|
115 | return $this->config; |
|
116 | } |
|
117 | ||
118 | public function state() : string |
|
119 | { |
|
120 | return $this->state; |
|
121 | } |
|
122 | ||
123 | public function startedAt() : DateTimeInterface |
|
124 | { |
|
125 | return $this->started_at; |
|
126 | } |
|
127 | ||
128 | public function finishedAt() : DateTimeInterface |
|
129 | { |
|
130 | return $this->finished_at; |
|
131 | } |
|
132 | ||
133 | public function duration() : int |
|
134 | { |
|
135 | return $this->duration; |
|
136 | } |
|
137 | ||
138 | public function jobIds() : array |
|
139 | { |
|
140 | return $this->job_ids; |
|
141 | } |
|
142 | ||
143 | public function refresh() |
|
144 | { |
|
145 | throw new AbstractMethodException(); |
|
146 | } |
|
147 | } |
|
148 |
@@ 9-152 (lines=144) @@ | ||
6 | use DateTimeInterface; |
|
7 | use WyriHaximus\ApiClient\Resource\TransportAwareTrait; |
|
8 | ||
9 | class Job implements JobInterface |
|
10 | { |
|
11 | use TransportAwareTrait; |
|
12 | ||
13 | /** |
|
14 | * @var int |
|
15 | */ |
|
16 | protected $id; |
|
17 | ||
18 | /** |
|
19 | * @var int |
|
20 | */ |
|
21 | protected $build_id; |
|
22 | ||
23 | /** |
|
24 | * @var int |
|
25 | */ |
|
26 | protected $repository_id; |
|
27 | ||
28 | /** |
|
29 | * @var int |
|
30 | */ |
|
31 | protected $commit_id; |
|
32 | ||
33 | /** |
|
34 | * @var int |
|
35 | */ |
|
36 | protected $log_id; |
|
37 | ||
38 | /** |
|
39 | * @var string |
|
40 | */ |
|
41 | protected $number; |
|
42 | ||
43 | /** |
|
44 | * @var array |
|
45 | */ |
|
46 | protected $config = []; |
|
47 | ||
48 | /** |
|
49 | * @var string |
|
50 | */ |
|
51 | protected $state; |
|
52 | ||
53 | /** |
|
54 | * @var DateTimeInterface |
|
55 | */ |
|
56 | protected $started_at; |
|
57 | ||
58 | /** |
|
59 | * @var DateTimeInterface |
|
60 | */ |
|
61 | protected $finished_at; |
|
62 | ||
63 | /** |
|
64 | * @var string |
|
65 | */ |
|
66 | protected $queue; |
|
67 | ||
68 | /** |
|
69 | * @var bool |
|
70 | */ |
|
71 | protected $allow_failure; |
|
72 | ||
73 | /** |
|
74 | * @var int[] |
|
75 | */ |
|
76 | protected $annotation_ids; |
|
77 | ||
78 | public function id() : int |
|
79 | { |
|
80 | return $this->id; |
|
81 | } |
|
82 | ||
83 | public function buildId() : int |
|
84 | { |
|
85 | return $this->build_id; |
|
86 | } |
|
87 | ||
88 | public function repositoryId() : int |
|
89 | { |
|
90 | return $this->repository_id; |
|
91 | } |
|
92 | ||
93 | public function commitId() : int |
|
94 | { |
|
95 | return $this->commit_id; |
|
96 | } |
|
97 | ||
98 | public function logId() : int |
|
99 | { |
|
100 | return $this->log_id; |
|
101 | } |
|
102 | ||
103 | public function number() : string |
|
104 | { |
|
105 | return $this->number; |
|
106 | } |
|
107 | ||
108 | public function config() : array |
|
109 | { |
|
110 | return $this->config; |
|
111 | } |
|
112 | ||
113 | public function state() : string |
|
114 | { |
|
115 | return $this->state; |
|
116 | } |
|
117 | ||
118 | public function startedAt() : DateTimeInterface |
|
119 | { |
|
120 | return $this->started_at; |
|
121 | } |
|
122 | ||
123 | public function finishedAt() : DateTimeInterface |
|
124 | { |
|
125 | return $this->finished_at; |
|
126 | } |
|
127 | ||
128 | public function queue() : string |
|
129 | { |
|
130 | return $this->queue; |
|
131 | } |
|
132 | ||
133 | public function allowFailure() : bool |
|
134 | { |
|
135 | return $this->allow_failure; |
|
136 | } |
|
137 | ||
138 | public function annotationIds() : array |
|
139 | { |
|
140 | return $this->annotation_ids; |
|
141 | } |
|
142 | ||
143 | public function annotations() |
|
144 | { |
|
145 | throw new AbstractMethodException(); |
|
146 | } |
|
147 | ||
148 | public function refresh() |
|
149 | { |
|
150 | throw new AbstractMethodException(); |
|
151 | } |
|
152 | } |
|
153 |