Issues (570)

Block/InfoBoleto.php (4 issues)

Labels
1
<?php
2
/**
3
 * Copyright © Wirecard Brasil. All rights reserved.
4
 *
5
 * @author    Bruno Elisei <[email protected]>
6
 * See COPYING.txt for license details.
7
 */
8
9
namespace Moip\Magento2\Block;
10
11
use Magento\Framework\Phrase;
0 ignored issues
show
The type Magento\Framework\Phrase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Magento\Payment\Block\ConfigurableInfo;
0 ignored issues
show
The type Magento\Payment\Block\ConfigurableInfo was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
/**
15
 * Class InfoBoleto - Boleto payment information.
16
 */
17
class InfoBoleto 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);
0 ignored issues
show
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        return /** @scrutinizer ignore-call */ __($field);
Loading history...
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