Status   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toOptionArray() 0 25 1
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