Money   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 10
c 1
b 0
f 1
dl 0
loc 27
ccs 7
cts 11
cp 0.6364
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrencyCode() 0 3 1
A getValue() 0 3 1
A __construct() 0 4 1
A toArray() 0 5 1
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