| Total Complexity | 5 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class JobTiming |
||
| 6 | { |
||
| 7 | const STATUS_INSERT = 0; |
||
| 8 | const STATUS_INSERT_DELAYED = 1; |
||
| 9 | const STATUS_FINISHED_SUCCESS = 100; |
||
| 10 | const STATUS_FINISHED_ERROR = 101; |
||
| 11 | const STATUS_FINISHED_EXPIRED = 102; |
||
| 12 | 1 | const STATUS_FINISHED_STALLED = 103; |
|
| 13 | |||
| 14 | 1 | protected $finishedAt; |
|
| 15 | protected $status; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * A list of all the states and descriptions for them. |
||
| 19 | * |
||
| 20 | 3 | * @return array |
|
| 21 | */ |
||
| 22 | 3 | public static function getStates() |
|
| 23 | 3 | { |
|
| 24 | return [self::STATUS_FINISHED_SUCCESS => ['label' => 'Finished: SUCCESS', 'color' => 'green'], |
||
| 25 | self::STATUS_FINISHED_ERROR => ['label' => 'Finished: ERROR', 'color' => 'red'], |
||
| 26 | self::STATUS_FINISHED_EXPIRED => ['label' => 'Finished: EXPIRED', 'color' => 'orange'], |
||
| 27 | self::STATUS_FINISHED_STALLED => ['label' => 'Finished: STALLED', 'color' => 'gold'], |
||
| 28 | self::STATUS_INSERT => ['label' => 'INSERT', 'color' => 'purple'], |
||
| 29 | self::STATUS_INSERT_DELAYED => ['label' => 'INSERT (Delayed)', 'color' => 'navy'], ]; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return mixed |
||
| 34 | */ |
||
| 35 | public function getFinishedAt() |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param mixed $finishedAt |
||
| 42 | */ |
||
| 43 | public function setFinishedAt($finishedAt) |
||
| 44 | { |
||
| 45 | $this->finishedAt = $finishedAt; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | public function getStatus() |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param int $status |
||
| 58 | */ |
||
| 59 | public function setStatus($status) |
||
| 62 | } |
||
| 63 | } |
||
| 64 |