Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class Point |
||
6 | { |
||
7 | /** |
||
8 | * @var float |
||
9 | */ |
||
10 | private $x; |
||
11 | |||
12 | /** |
||
13 | * @var float |
||
14 | */ |
||
15 | private $y; |
||
16 | |||
17 | /** |
||
18 | * Point constructor. |
||
19 | * |
||
20 | * @param mixed $x |
||
21 | * @param mixed $y |
||
22 | */ |
||
23 | public function __construct($x, $y) |
||
24 | { |
||
25 | $this->x = floatval($x); |
||
26 | $this->y = floatval($y); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return float |
||
31 | */ |
||
32 | public function x() |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return float |
||
39 | */ |
||
40 | public function y() |
||
43 | } |
||
44 | } |