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

Getpay::getExpiration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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\Block\Sales\Form;
10
11
use Getnet\PaymentMagento\Gateway\Config\ConfigGetpay;
12
use Magento\Framework\View\Element\Template\Context;
13
14
/**
15
 * Class Getpay - Form for payment by boleto.
16
 */
17
class Getpay extends \Magento\Payment\Block\Form
18
{
19
    /**
20
     * Getpay template.
21
     *
22
     * @var string
23
     */
24
    protected $_template = 'Getnet_PaymentMagento::form/getpay.phtml';
25
26
    /**
27
     * @var ConfigGetpay
28
     */
29
    protected $configGetpay;
30
31
    /**
32
     * @param Context      $context
33
     * @param ConfigGetpay $configGetpay
34
     */
35
    public function __construct(
36
        Context $context,
37
        ConfigGetpay $configGetpay
38
    ) {
39
        parent::__construct($context);
40
        $this->configGetpay = $configGetpay;
41
    }
42
43
    /**
44
     * Title - Getpay.
45
     *
46
     * @return string
47
     */
48
    public function getTitle()
49
    {
50
        return $this->configGetpay->getTitle();
51
    }
52
53
    /**
54
     * Instruction - Getpay.
55
     *
56
     * @return string
57
     */
58
    public function getInstruction()
59
    {
60
        return $this->configGetpay->getInstructionCheckout();
61
    }
62
63
    /**
64
     * Expiration - Getpay.
65
     *
66
     * @return string
67
     */
68
    public function getExpiration()
69
    {
70
        return $this->configGetpay->getExpirationFormat();
71
    }
72
}
73