Passed
Push — main ( 6b22cc...840532 )
by Bruno
09:36 queued 04:25
created

AllowedMethods::toOptionArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 14
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 20
rs 9.7998
1
<?php
2
/**
3
 * Copyright © Getnet. All rights reserved.
4
 *
5
 * @author    Bruno Elisei <[email protected]>
6
 * See LICENSE for license details.
7
 */
8
9
namespace Getnet\PaymentMagento\Model\Adminhtml\Source;
10
11
use Magento\Framework\Option\ArrayInterface;
12
13
/**
14
 * Class AllowedMethods - Defines product types.
15
 */
16
class AllowedMethods 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

16
class AllowedMethods 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...
17
{
18
    /**
19
     * Returns Options.
20
     *
21
     * @return array
22
     */
23
    public function toOptionArray(): array
24
    {
25
        $options = [];
26
        $options[] = [
27
            'value' => 'credit',
28
            'label' => __('Credit'),
29
        ];
30
        $options[] = [
31
            'value' => 'debit',
32
            'label' => __('Debit'),
33
        ];
34
        $options[] = [
35
            'value' => 'pix',
36
            'label' => __('Pix'),
37
        ];
38
        $options[] = [
39
            'value' => 'qr_code',
40
            'label' => __('Qr Code'),
41
        ];
42
        return $options;
43
    }
44
}
45