Status::toOptionArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 9.52
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace LizardMedia\CronScheduler\Model\Schedule\Source;
4
5
use Magento\Cron\Model\Schedule;
6
use Magento\Framework\Data\OptionSourceInterface;
7
8
/**
9
 * Class Status
10
 * @package LizardMedia\CronScheduler\Model\Schedule\Source
11
 */
12
class Status implements OptionSourceInterface
13
{
14
    /**
15
     * @return array
16
     */
17
    public function toOptionArray()
18
    {
19
        return [
20
            [
21
                'value' => Schedule::STATUS_ERROR,
22
                'label' => __('Error'),
23
            ],
24
            [
25
                'value' => Schedule::STATUS_MISSED,
26
                'label' => __('Missed'),
27
            ],
28
            [
29
                'value' => Schedule::STATUS_PENDING,
30
                'label' => __('Pending'),
31
            ],
32
            [
33
                'value' => Schedule::STATUS_RUNNING,
34
                'label' => __('Running'),
35
            ],
36
            [
37
                'value' => Schedule::STATUS_SUCCESS,
38
                'label' => __('Success'),
39
            ],
40
        ];
41
    }
42
}
43