Cleanup   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toOptionArray() 0 17 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * File:Cleanup.php
6
 *
7
 * @author Maciej Sławik <[email protected]>
8
 * @copyright Copyright (C) 2018 Lizard Media (http://lizardmedia.pl)
9
 */
10
11
namespace LizardMedia\PasswordMigrator\Model\Config\Source;
12
13
use Magento\Framework\Option\ArrayInterface;
14
15
/**
16
 * Class Cleanup
17
 * @package LizardMedia\PasswordMigrator\Model\Config\Source
18
 */
19
class Cleanup implements ArrayInterface
20
{
21
    const CLEAN_YEAR = 2;
22
    const CLEAN_HALFYEAR = 1;
23
    const CLEAN_NEVER = 0;
24
25
    /**
26
     * @return array
27
     */
28
    public function toOptionArray()
29
    {
30
        return [
31
            [
32
                'value' => self::CLEAN_HALFYEAR,
33
                'label' => __('After half a year')
34
            ],
35
            [
36
                'value' => self::CLEAN_YEAR,
37
                'label' => __('After a year')
38
            ],
39
            [
40
                'value' => self::CLEAN_NEVER,
41
                'label' => __('Never')
42
            ]
43
        ];
44
    }
45
}
46