DisplayType::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 DisplayType
9
 * @package Pagantis\Pagantis\Model\Adminhtml\Source
10
 */
11
class DisplayType 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 DisplayType 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
     * IFRAME
15
     */
16
    const IFRAME = 1;
17
    /**
18
     * REDIRECT
19
     */
20
    const REDIRECT = 0;
21
    /**
22
     * @return array
23
     */
24
    public function toOptionArray()
25
    {
26
        return array(
27
            array(
28
                'label' => __(' Iframe'),
29
                'value' => self::IFRAME,
30
            ),
31
            array(
32
                'label' => __(' Redirect'),
33
                'value' => self::REDIRECT,
34
            )
35
        );
36
    }
37
}
38