SandboxType::toOptionArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pagantis\Pagantis\Model\Adminhtml\Source;
4
5
use Magento\Framework\Option\ArrayInterface;
6
7
/**
8
 * Class SandboxType
9
 * @package Pagantis\Pagantis\Model\Adminhtml\Source
10
 */
11
class SandboxType implements ArrayInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Magento\Framework\Option\ArrayInterface has been deprecated: 102.0.1 please use \Magento\Framework\Data\OptionSourceInterface instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

11
class SandboxType implements /** @scrutinizer ignore-deprecated */ ArrayInterface

This interface has been deprecated. The supplier of the interface has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the interface will be removed and what other interface to use instead.

Loading history...
12
{
13
    /**
14
     * PRODUCTION
15
     */
16
    const PRODUCTION = 1;
17
    /**
18
     * TESTING
19
     */
20
    const TESTING = 0;
21
    /**
22
     * @return array
23
     */
24
    public function toOptionArray()
25
    {
26
        return array(
27
            array(
28
                'label' => __(' Production'),
29
                'value' => self::PRODUCTION,
30
            ),
31
            array(
32
                'label' => __(' Testing'),
33
                'value' => self::TESTING,
34
            )
35
        );
36
    }
37
}
38