PaymentAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toOptionArray() 0 10 1
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\Payment\Model\Method\AbstractMethod;
12
13
/**
14
 * Class PaymentAction - Adds payment authorization.
15
 */
16
class PaymentAction implements \Magento\Framework\Option\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 PaymentAction implements /** @scrutinizer ignore-deprecated */ \Magento\Framework\Option\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
     * To Options Array.
20
     *
21
     * @return array
22
     */
23
    public function toOptionArray(): array
24
    {
25
        return [
26
            [
27
                'value' => AbstractMethod::ACTION_AUTHORIZE,
28
                'label' => __('Authorize'),
29
            ],
30
            [
31
                'value' => AbstractMethod::ACTION_AUTHORIZE_CAPTURE,
32
                'label' => __('Authorize and Capture'),
33
            ],
34
35
        ];
36
    }
37
}
38