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