Passed
Push — 2.x ( 829ffb...9244df )
by Darío
48s queued 14s
created

Money::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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