Issues (139)

Block/Sales/Info/TwoCc.php (1 issue)

Severity
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\Info;
10
11
use Magento\Framework\Phrase;
12
use Magento\Payment\Block\ConfigurableInfo;
13
14
/**
15
 * Class TwoCc - Payment information.
16
 */
17
class TwoCc extends ConfigurableInfo
18
{
19
    /**
20
     * Returns label.
21
     *
22
     * @param string $field
23
     *
24
     * @return Phrase
25
     */
26
    protected function getLabel($field)
27
    {
28
        return __($field);
29
    }
30
31
    /**
32
     * Returns value view.
33
     *
34
     * @param string $field
35
     * @param string $value
36
     *
37
     * @return string | Phrase
38
     */
39
    protected function getValueView($field, $value)
40
    {
41
        if (is_array($value)) {
0 ignored issues
show
The condition is_array($value) is always false.
Loading history...
42
            return implode('; ', $value);
43
        }
44
45
        return parent::getValueView($field, $value);
46
    }
47
}
48