Total Complexity | 6 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class Money |
||
6 | { |
||
7 | private $pence; |
||
8 | |||
9 | private function __construct($pence) |
||
10 | { |
||
11 | $this->pence = (integer) $pence; |
||
12 | } |
||
13 | |||
14 | public static function fromPounds($pounds) |
||
15 | { |
||
16 | return new static($pounds * 100); |
||
17 | } |
||
18 | |||
19 | public static function fromPence($pence) |
||
22 | } |
||
23 | |||
24 | public function inPence() |
||
27 | } |
||
28 | |||
29 | public function inPounds() |
||
32 | } |
||
33 | |||
34 | public function inPoundsAndPence() |
||
39 |