Money::getCurrencyCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace PaymentGateway\PayPalSdk\Subscriptions;
4
5
class Money
6
{
7
    protected string $currencyCode;
8
9
    protected string $value;
10
11 4
    public function __construct(string $currencyCode, string $value)
12
    {
13 4
        $this->currencyCode = $currencyCode;
14 4
        $this->value = $value;
15 4
    }
16
17
    public function getCurrencyCode(): string
18
    {
19
        return $this->currencyCode;
20
    }
21
22
    public function getValue(): string
23
    {
24
        return $this->value;
25
    }
26
27 4
    public function toArray(): array
28
    {
29
        return [
30 4
            'currency_code' => $this->currencyCode,
31 4
            'value' => $this->value
32
        ];
33
    }
34
}
35