HeidelpayApiAdapter::getTranslatedMessageByCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
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