HeidelpayApiAdapter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTranslatedMessageByCode() 0 5 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Client\Heidelpay\Sdk;
9
10
use Heidelpay\MessageCodeMapper\MessageCodeMapper;
11
12
/**
13
 * @method \SprykerEco\Client\Heidelpay\HeidelpayFactory getFactory()
14
 */
15
class HeidelpayApiAdapter implements HeidelpayApiAdapterInterface
16
{
17
    /**
18
     * @param string $messageCode
19
     * @param string $locale
20
     *
21
     * @return string
22
     */
23
    public function getTranslatedMessageByCode($messageCode, $locale): string
24
    {
25
        $heidelpayMessage = new MessageCodeMapper($locale);
26
27
        return $heidelpayMessage->getMessage($messageCode);
28
    }
29
}
30