1 | <?php |
||||
2 | |||||
3 | namespace Pagantis\Pagantis\Block; |
||||
4 | |||||
5 | use Magento\Framework\Phrase; |
||||
6 | use Magento\Payment\Block\ConfigurableInfo; |
||||
7 | use Pagantis\Pagantis\Gateway\Response\FraudHandler; |
||||
0 ignored issues
–
show
|
|||||
8 | |||||
9 | /** |
||||
10 | * Class Info |
||||
11 | * @package Pagantis\Pagantis\Block |
||||
12 | */ |
||||
13 | class Info extends ConfigurableInfo |
||||
14 | { |
||||
15 | /** |
||||
16 | * Returns label |
||||
17 | * |
||||
18 | * @param string $field |
||||
19 | * @return Phrase |
||||
20 | */ |
||||
21 | protected function getLabel($field) |
||||
22 | { |
||||
23 | return __($field); |
||||
24 | } |
||||
25 | |||||
26 | /** |
||||
27 | * Returns value view |
||||
28 | * |
||||
29 | * @param string $field |
||||
30 | * @param string | array $value |
||||
31 | * @return string | Phrase |
||||
32 | */ |
||||
33 | protected function getValueView($field, $value) |
||||
34 | { |
||||
35 | switch ($field) { |
||||
36 | case FraudHandler::FRAUD_MSG_LIST: |
||||
37 | return implode('; ', $value); |
||||
0 ignored issues
–
show
It seems like
$value can also be of type string ; however, parameter $pieces of implode() does only seem to accept array , maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
38 | } |
||||
39 | return parent::getValueView($field, $value); |
||||
0 ignored issues
–
show
It seems like
$value can also be of type array ; however, parameter $value of Magento\Payment\Block\Co...bleInfo::getValueView() does only seem to accept string , maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
40 | } |
||||
41 | } |
||||
42 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths