Passed
Pull Request — master (#12)
by Laurens
01:27
created

AbstractCurrencyAmount::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\ApplePassbook\MetaData\SemanticTag;
6
7
use LauLamanApps\ApplePassbook\MetaData\SemanticTag;
8
9
abstract class AbstractCurrencyAmount implements SemanticTag
10
{
11
    private string $amount;
12
    private string $currencyCode;
13
14
    public function __construct(
15
        string $amount,
16
        string $currencyCode
17
    ) {
18
        $this->amount = $amount;
19
        $this->currencyCode = $currencyCode;
20
    }
21
22
    public function getKey(): string
23
    {
24
        return 'totalPrice';
25
    }
26
27
    public function getValue(): array
28
    {
29
        return [
30
            'amount' => $this->amount,
31
            'currencyCode' => $this->currencyCode,
32
        ];
33
    }
34
}