Total Complexity | 13 |
Total Lines | 110 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | class Elements implements ArraySerializableInterface, JsonSerializable |
||
19 | { |
||
20 | use ArraySerializable; |
||
21 | |||
22 | /** |
||
23 | * @var Rectangle |
||
24 | */ |
||
25 | private $rectangle; |
||
26 | |||
27 | /** |
||
28 | * @var Line |
||
29 | */ |
||
30 | private $line; |
||
31 | |||
32 | /** |
||
33 | * @var Point |
||
34 | */ |
||
35 | private $point; |
||
36 | |||
37 | /** |
||
38 | * @var Arc |
||
39 | */ |
||
40 | private $arc; |
||
41 | |||
42 | /** |
||
43 | * @return Rectangle |
||
44 | */ |
||
45 | public function getRectangle() |
||
46 | { |
||
47 | return $this->rectangle; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return Rectangle |
||
52 | */ |
||
53 | public function rectangle() |
||
54 | { |
||
55 | if (is_null($this->rectangle)) { |
||
56 | $this->rectangle = new Rectangle(); |
||
57 | } |
||
58 | |||
59 | return $this->rectangle; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return Line |
||
64 | */ |
||
65 | public function getLine() |
||
66 | { |
||
67 | return $this->line; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return Line |
||
72 | */ |
||
73 | public function line() |
||
74 | { |
||
75 | if (is_null($this->line)) { |
||
76 | $this->line = new Line(); |
||
77 | } |
||
78 | |||
79 | return $this->line; |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @return Point |
||
84 | */ |
||
85 | public function getPoint() |
||
86 | { |
||
87 | return $this->point; |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * @return Point |
||
92 | */ |
||
93 | public function point() |
||
94 | { |
||
95 | if (is_null($this->point)) { |
||
96 | $this->point = new Point(); |
||
97 | } |
||
98 | |||
99 | return $this->point; |
||
100 | } |
||
101 | |||
102 | /** |
||
103 | * @return Arc |
||
104 | */ |
||
105 | public function getArc() |
||
108 | } |
||
109 | |||
110 | /** |
||
111 | * @return Arc |
||
112 | */ |
||
113 | public function arc() |
||
120 | } |
||
121 | |||
122 | /** |
||
123 | * @return array |
||
124 | */ |
||
125 | public function jsonSerialize() |
||
126 | { |
||
130 |