pagantis /
magento-2X
| 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; |
||||
| 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
Bug
introduced
by
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 |