AbstractCurrencyAmount   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValue() 0 5 1
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
    /**
23
     * @return array<string, string>
24
     */
25
    public function getValue(): array
26
    {
27
        return [
28
            'amount' => $this->amount,
29
            'currencyCode' => $this->currencyCode,
30
        ];
31
    }
32
}
33