Total Complexity | 6 |
Total Lines | 75 |
Duplicated Lines | 0 % |
Coverage | 81.25% |
Changes | 0 |
1 | <?php |
||
17 | abstract class AbstractJob implements JobInterface |
||
18 | { |
||
19 | /** |
||
20 | * Data. |
||
21 | * |
||
22 | * @var mixed |
||
23 | **/ |
||
24 | protected $data; |
||
25 | |||
26 | /** |
||
27 | * Scheduler |
||
28 | * |
||
29 | * @var Scheduler |
||
30 | */ |
||
31 | protected $scheduler; |
||
32 | |||
33 | /** |
||
34 | * Job ID. |
||
35 | * |
||
36 | * @var ObjectId |
||
37 | */ |
||
38 | protected $id; |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 16 | public function setData($data): JobInterface |
|
44 | { |
||
45 | 16 | $this->data = $data; |
|
46 | |||
47 | 16 | return $this; |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 1 | public function getData() |
|
54 | { |
||
55 | 1 | return $this->data; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 16 | public function setId(ObjectId $id): JobInterface |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 1 | public function getId(): ObjectId |
|
74 | } |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | 14 | public function setScheduler(Scheduler $scheduler): JobInterface |
|
83 | } |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function updateProgress(float $progress): JobInterface |
||
92 | } |
||
93 | } |
||
94 |