DisplayType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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