Passed
Push — master ( a738d8...ad4d7e )
by
unknown
03:09
created

Money::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace CultureKings\Afterpay\Model;
4
5
/**
6
 * Class Money
7
 *
8
 * @package CultureKings\Afterpay\Model
9
 */
10
class Money
11
{
12
    /**
13
     * @var double
14
     */
15
    protected $amount;
16
    /**
17
     * @var string
18
     */
19
    protected $currency;
20
21
    /**
22
     * Money constructor.
23
     * @param float  $amount
24
     * @param string $currency
25
     */
26
    public function __construct($amount = null, $currency = null)
27
    {
28
        $this->setAmount($amount);
29
        $this->setCurrency($currency);
30
    }
31
32
    /**
33
     * @return float
34
     */
35
    public function getAmount()
36
    {
37
        return $this->amount;
38
    }
39
40
    /**
41
     * @param double $amount
42
     * @return $this
43
     */
44
    public function setAmount($amount)
45
    {
46
        $this->amount = $amount;
47
48
        return $this;
49
    }
50
51
52
    /**
53
     * @return string
54
     */
55
    public function getCurrency()
56
    {
57
        return $this->currency;
58
    }
59
60
    /**
61
     * @param string $currency
62
     * @return $this
63
     */
64
    public function setCurrency($currency)
65
    {
66
        $this->currency = $currency;
67
68
        return $this;
69
    }
70
}
71