@@ -11,11 +11,11 @@ |
||
11 | 11 | */ |
12 | 12 | class LabelsCollection extends ArrayAccess implements \JsonSerializable |
13 | 13 | { |
14 | - /** |
|
15 | - * return string |
|
16 | - */ |
|
17 | - public function jsonSerialize() |
|
18 | - { |
|
19 | - return Json::encode($this->data); |
|
20 | - } |
|
14 | + /** |
|
15 | + * return string |
|
16 | + */ |
|
17 | + public function jsonSerialize() |
|
18 | + { |
|
19 | + return Json::encode($this->data); |
|
20 | + } |
|
21 | 21 | } |
@@ -11,90 +11,90 @@ |
||
11 | 11 | */ |
12 | 12 | class PieOptions extends Options |
13 | 13 | { |
14 | - /** |
|
15 | - * @var int |
|
16 | - */ |
|
17 | - protected $cutoutPercentage; |
|
18 | - |
|
19 | - /** |
|
20 | - * @var float |
|
21 | - */ |
|
22 | - protected $rotation; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var float |
|
26 | - */ |
|
27 | - protected $circumference; |
|
28 | - |
|
29 | - /** |
|
30 | - * @return Animation |
|
31 | - */ |
|
32 | - public function getAnimation() |
|
33 | - { |
|
34 | - if (is_null($this->animation)) { |
|
35 | - $this->animation = new PieAnimation(); |
|
36 | - } |
|
37 | - |
|
38 | - return $this->animation; |
|
39 | - } |
|
40 | - |
|
41 | - /** |
|
42 | - * @return int |
|
43 | - */ |
|
44 | - public function getCutoutPercentage() |
|
45 | - { |
|
46 | - return $this->cutoutPercentage; |
|
47 | - } |
|
48 | - |
|
49 | - /** |
|
50 | - * @param int $cutoutPercentage |
|
51 | - * |
|
52 | - * @return $this |
|
53 | - */ |
|
54 | - public function setCutoutPercentage($cutoutPercentage) |
|
55 | - { |
|
56 | - $this->cutoutPercentage = $cutoutPercentage; |
|
57 | - |
|
58 | - return $this; |
|
59 | - } |
|
60 | - |
|
61 | - /** |
|
62 | - * @return float |
|
63 | - */ |
|
64 | - public function getRotation() |
|
65 | - { |
|
66 | - return $this->rotation; |
|
67 | - } |
|
68 | - |
|
69 | - /** |
|
70 | - * @param float $rotation |
|
71 | - * |
|
72 | - * @return $this |
|
73 | - */ |
|
74 | - public function setRotation($rotation) |
|
75 | - { |
|
76 | - $this->rotation = $rotation; |
|
77 | - |
|
78 | - return $this; |
|
79 | - } |
|
80 | - |
|
81 | - /** |
|
82 | - * @return float |
|
83 | - */ |
|
84 | - public function getCircumference() |
|
85 | - { |
|
86 | - return $this->circumference; |
|
87 | - } |
|
88 | - |
|
89 | - /** |
|
90 | - * @param float $circumference |
|
91 | - * |
|
92 | - * @return $this |
|
93 | - */ |
|
94 | - public function setCircumference($circumference) |
|
95 | - { |
|
96 | - $this->circumference = $circumference; |
|
97 | - |
|
98 | - return $this; |
|
99 | - } |
|
14 | + /** |
|
15 | + * @var int |
|
16 | + */ |
|
17 | + protected $cutoutPercentage; |
|
18 | + |
|
19 | + /** |
|
20 | + * @var float |
|
21 | + */ |
|
22 | + protected $rotation; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var float |
|
26 | + */ |
|
27 | + protected $circumference; |
|
28 | + |
|
29 | + /** |
|
30 | + * @return Animation |
|
31 | + */ |
|
32 | + public function getAnimation() |
|
33 | + { |
|
34 | + if (is_null($this->animation)) { |
|
35 | + $this->animation = new PieAnimation(); |
|
36 | + } |
|
37 | + |
|
38 | + return $this->animation; |
|
39 | + } |
|
40 | + |
|
41 | + /** |
|
42 | + * @return int |
|
43 | + */ |
|
44 | + public function getCutoutPercentage() |
|
45 | + { |
|
46 | + return $this->cutoutPercentage; |
|
47 | + } |
|
48 | + |
|
49 | + /** |
|
50 | + * @param int $cutoutPercentage |
|
51 | + * |
|
52 | + * @return $this |
|
53 | + */ |
|
54 | + public function setCutoutPercentage($cutoutPercentage) |
|
55 | + { |
|
56 | + $this->cutoutPercentage = $cutoutPercentage; |
|
57 | + |
|
58 | + return $this; |
|
59 | + } |
|
60 | + |
|
61 | + /** |
|
62 | + * @return float |
|
63 | + */ |
|
64 | + public function getRotation() |
|
65 | + { |
|
66 | + return $this->rotation; |
|
67 | + } |
|
68 | + |
|
69 | + /** |
|
70 | + * @param float $rotation |
|
71 | + * |
|
72 | + * @return $this |
|
73 | + */ |
|
74 | + public function setRotation($rotation) |
|
75 | + { |
|
76 | + $this->rotation = $rotation; |
|
77 | + |
|
78 | + return $this; |
|
79 | + } |
|
80 | + |
|
81 | + /** |
|
82 | + * @return float |
|
83 | + */ |
|
84 | + public function getCircumference() |
|
85 | + { |
|
86 | + return $this->circumference; |
|
87 | + } |
|
88 | + |
|
89 | + /** |
|
90 | + * @param float $circumference |
|
91 | + * |
|
92 | + * @return $this |
|
93 | + */ |
|
94 | + public function setCircumference($circumference) |
|
95 | + { |
|
96 | + $this->circumference = $circumference; |
|
97 | + |
|
98 | + return $this; |
|
99 | + } |
|
100 | 100 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function getAnimation() |
33 | 33 | { |
34 | 34 | if (is_null($this->animation)) { |
35 | - $this->animation = new PieAnimation(); |
|
35 | + $this->animation = new PieAnimation(); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return $this->animation; |
@@ -13,113 +13,113 @@ |
||
13 | 13 | */ |
14 | 14 | class Animation implements ArraySerializableInterface, \JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - /** |
|
19 | - * @var int |
|
20 | - */ |
|
21 | - private $duration; |
|
22 | - |
|
23 | - /** |
|
24 | - * @var string |
|
25 | - */ |
|
26 | - private $easing; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var Expr |
|
30 | - */ |
|
31 | - private $onProgress; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var Expr |
|
35 | - */ |
|
36 | - private $onComplete; |
|
37 | - |
|
38 | - /** |
|
39 | - * @return int |
|
40 | - */ |
|
41 | - public function getDuration() |
|
42 | - { |
|
43 | - return $this->duration; |
|
44 | - } |
|
45 | - |
|
46 | - /** |
|
47 | - * @param int $duration |
|
48 | - * |
|
49 | - * @return $this |
|
50 | - */ |
|
51 | - public function setDuration($duration) |
|
52 | - { |
|
53 | - $this->duration = $duration; |
|
54 | - |
|
55 | - return $this; |
|
56 | - } |
|
57 | - |
|
58 | - /** |
|
59 | - * @return string |
|
60 | - */ |
|
61 | - public function getEasing() |
|
62 | - { |
|
63 | - return $this->easing; |
|
64 | - } |
|
65 | - |
|
66 | - /** |
|
67 | - * @param string $easing |
|
68 | - * |
|
69 | - * @return $this |
|
70 | - */ |
|
71 | - public function setEasing($easing) |
|
72 | - { |
|
73 | - $this->easing = $easing; |
|
74 | - |
|
75 | - return $this; |
|
76 | - } |
|
77 | - |
|
78 | - /** |
|
79 | - * @return Expr |
|
80 | - */ |
|
81 | - public function getOnProgress() |
|
82 | - { |
|
83 | - return $this->onProgress; |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * @param string $onProgress |
|
88 | - * |
|
89 | - * @return $this |
|
90 | - */ |
|
91 | - public function setOnProgress($onProgress) |
|
92 | - { |
|
93 | - $this->onProgress = new Expr(strval($onProgress)); |
|
94 | - |
|
95 | - return $this; |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * @return Expr |
|
100 | - */ |
|
101 | - public function getOnComplete() |
|
102 | - { |
|
103 | - return $this->onComplete; |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * @param string $onComplete |
|
108 | - * |
|
109 | - * @return $this |
|
110 | - */ |
|
111 | - public function setOnComplete($onComplete) |
|
112 | - { |
|
113 | - $this->onComplete = new Expr(strval($onComplete)); |
|
114 | - |
|
115 | - return $this; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @return string |
|
120 | - */ |
|
121 | - public function jsonSerialize() |
|
122 | - { |
|
123 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
124 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + /** |
|
19 | + * @var int |
|
20 | + */ |
|
21 | + private $duration; |
|
22 | + |
|
23 | + /** |
|
24 | + * @var string |
|
25 | + */ |
|
26 | + private $easing; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var Expr |
|
30 | + */ |
|
31 | + private $onProgress; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var Expr |
|
35 | + */ |
|
36 | + private $onComplete; |
|
37 | + |
|
38 | + /** |
|
39 | + * @return int |
|
40 | + */ |
|
41 | + public function getDuration() |
|
42 | + { |
|
43 | + return $this->duration; |
|
44 | + } |
|
45 | + |
|
46 | + /** |
|
47 | + * @param int $duration |
|
48 | + * |
|
49 | + * @return $this |
|
50 | + */ |
|
51 | + public function setDuration($duration) |
|
52 | + { |
|
53 | + $this->duration = $duration; |
|
54 | + |
|
55 | + return $this; |
|
56 | + } |
|
57 | + |
|
58 | + /** |
|
59 | + * @return string |
|
60 | + */ |
|
61 | + public function getEasing() |
|
62 | + { |
|
63 | + return $this->easing; |
|
64 | + } |
|
65 | + |
|
66 | + /** |
|
67 | + * @param string $easing |
|
68 | + * |
|
69 | + * @return $this |
|
70 | + */ |
|
71 | + public function setEasing($easing) |
|
72 | + { |
|
73 | + $this->easing = $easing; |
|
74 | + |
|
75 | + return $this; |
|
76 | + } |
|
77 | + |
|
78 | + /** |
|
79 | + * @return Expr |
|
80 | + */ |
|
81 | + public function getOnProgress() |
|
82 | + { |
|
83 | + return $this->onProgress; |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * @param string $onProgress |
|
88 | + * |
|
89 | + * @return $this |
|
90 | + */ |
|
91 | + public function setOnProgress($onProgress) |
|
92 | + { |
|
93 | + $this->onProgress = new Expr(strval($onProgress)); |
|
94 | + |
|
95 | + return $this; |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * @return Expr |
|
100 | + */ |
|
101 | + public function getOnComplete() |
|
102 | + { |
|
103 | + return $this->onComplete; |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * @param string $onComplete |
|
108 | + * |
|
109 | + * @return $this |
|
110 | + */ |
|
111 | + public function setOnComplete($onComplete) |
|
112 | + { |
|
113 | + $this->onComplete = new Expr(strval($onComplete)); |
|
114 | + |
|
115 | + return $this; |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @return string |
|
120 | + */ |
|
121 | + public function jsonSerialize() |
|
122 | + { |
|
123 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
124 | + } |
|
125 | 125 | } |
@@ -14,180 +14,180 @@ |
||
14 | 14 | */ |
15 | 15 | class Legend implements ArraySerializableInterface, \JsonSerializable |
16 | 16 | { |
17 | - use ArraySerializable; |
|
18 | - |
|
19 | - /** |
|
20 | - * @var bool |
|
21 | - */ |
|
22 | - private $display; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var string |
|
26 | - */ |
|
27 | - private $position; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var bool |
|
31 | - */ |
|
32 | - private $fullWidth; |
|
33 | - |
|
34 | - /** |
|
35 | - * @var Expr |
|
36 | - */ |
|
37 | - private $onClick; |
|
38 | - |
|
39 | - /** |
|
40 | - * @var Expr |
|
41 | - */ |
|
42 | - private $onHover; |
|
43 | - |
|
44 | - /** |
|
45 | - * @var LabelsCollection |
|
46 | - */ |
|
47 | - private $labels; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var bool |
|
51 | - */ |
|
52 | - private $reverse; |
|
53 | - |
|
54 | - /** |
|
55 | - * @return boolean |
|
56 | - */ |
|
57 | - public function isDisplay() |
|
58 | - { |
|
59 | - return $this->display; |
|
60 | - } |
|
61 | - |
|
62 | - /** |
|
63 | - * @param boolean $display |
|
64 | - * |
|
65 | - * @return $this |
|
66 | - */ |
|
67 | - public function setDisplay($display) |
|
68 | - { |
|
69 | - $this->display = ! ! $display; |
|
70 | - |
|
71 | - return $this; |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * @return string |
|
76 | - */ |
|
77 | - public function getPosition() |
|
78 | - { |
|
79 | - return $this->position; |
|
80 | - } |
|
81 | - |
|
82 | - /** |
|
83 | - * @param string $position |
|
84 | - * |
|
85 | - * @return $this |
|
86 | - */ |
|
87 | - public function setPosition($position) |
|
88 | - { |
|
89 | - $this->position = strval($position); |
|
90 | - |
|
91 | - return $this; |
|
92 | - } |
|
93 | - |
|
94 | - /** |
|
95 | - * @return boolean |
|
96 | - */ |
|
97 | - public function isFullWidth() |
|
98 | - { |
|
99 | - return $this->fullWidth; |
|
100 | - } |
|
101 | - |
|
102 | - /** |
|
103 | - * @param boolean $fullWidth |
|
104 | - * |
|
105 | - * @return $this |
|
106 | - */ |
|
107 | - public function setFullWidth($fullWidth) |
|
108 | - { |
|
109 | - $this->fullWidth = ! ! $fullWidth; |
|
110 | - |
|
111 | - return $this; |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * @return Expr |
|
116 | - */ |
|
117 | - public function getOnClick() |
|
118 | - { |
|
119 | - return $this->onClick; |
|
120 | - } |
|
121 | - |
|
122 | - /** |
|
123 | - * @param string $onClick |
|
124 | - * |
|
125 | - * @return $this |
|
126 | - */ |
|
127 | - public function setOnClick($onClick) |
|
128 | - { |
|
129 | - $this->onClick = new Expr(strval($onClick)); |
|
130 | - |
|
131 | - return $this; |
|
132 | - } |
|
133 | - |
|
134 | - /** |
|
135 | - * @return Expr |
|
136 | - */ |
|
137 | - public function getOnHover() |
|
138 | - { |
|
139 | - return $this->onHover; |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * @param string $onHover |
|
144 | - * |
|
145 | - * @return $this |
|
146 | - */ |
|
147 | - public function setOnHover($onHover) |
|
148 | - { |
|
149 | - $this->onHover = new Expr(strval($onHover)); |
|
150 | - |
|
151 | - return $this; |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * @return LabelsCollection |
|
156 | - */ |
|
157 | - public function labels() |
|
158 | - { |
|
159 | - if (is_null($this->labels)) { |
|
160 | - $this->labels = new LabelsCollection(); |
|
161 | - } |
|
162 | - |
|
163 | - return $this->labels; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * @return boolean |
|
168 | - */ |
|
169 | - public function isReverse() |
|
170 | - { |
|
171 | - return $this->reverse; |
|
172 | - } |
|
173 | - |
|
174 | - /** |
|
175 | - * @param boolean $reverse |
|
176 | - * |
|
177 | - * @return $this |
|
178 | - */ |
|
179 | - public function setReverse($reverse) |
|
180 | - { |
|
181 | - $this->reverse = ! ! $reverse; |
|
182 | - |
|
183 | - return $this; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @return string |
|
188 | - */ |
|
189 | - public function jsonSerialize() |
|
190 | - { |
|
191 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
192 | - } |
|
17 | + use ArraySerializable; |
|
18 | + |
|
19 | + /** |
|
20 | + * @var bool |
|
21 | + */ |
|
22 | + private $display; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var string |
|
26 | + */ |
|
27 | + private $position; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var bool |
|
31 | + */ |
|
32 | + private $fullWidth; |
|
33 | + |
|
34 | + /** |
|
35 | + * @var Expr |
|
36 | + */ |
|
37 | + private $onClick; |
|
38 | + |
|
39 | + /** |
|
40 | + * @var Expr |
|
41 | + */ |
|
42 | + private $onHover; |
|
43 | + |
|
44 | + /** |
|
45 | + * @var LabelsCollection |
|
46 | + */ |
|
47 | + private $labels; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var bool |
|
51 | + */ |
|
52 | + private $reverse; |
|
53 | + |
|
54 | + /** |
|
55 | + * @return boolean |
|
56 | + */ |
|
57 | + public function isDisplay() |
|
58 | + { |
|
59 | + return $this->display; |
|
60 | + } |
|
61 | + |
|
62 | + /** |
|
63 | + * @param boolean $display |
|
64 | + * |
|
65 | + * @return $this |
|
66 | + */ |
|
67 | + public function setDisplay($display) |
|
68 | + { |
|
69 | + $this->display = ! ! $display; |
|
70 | + |
|
71 | + return $this; |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * @return string |
|
76 | + */ |
|
77 | + public function getPosition() |
|
78 | + { |
|
79 | + return $this->position; |
|
80 | + } |
|
81 | + |
|
82 | + /** |
|
83 | + * @param string $position |
|
84 | + * |
|
85 | + * @return $this |
|
86 | + */ |
|
87 | + public function setPosition($position) |
|
88 | + { |
|
89 | + $this->position = strval($position); |
|
90 | + |
|
91 | + return $this; |
|
92 | + } |
|
93 | + |
|
94 | + /** |
|
95 | + * @return boolean |
|
96 | + */ |
|
97 | + public function isFullWidth() |
|
98 | + { |
|
99 | + return $this->fullWidth; |
|
100 | + } |
|
101 | + |
|
102 | + /** |
|
103 | + * @param boolean $fullWidth |
|
104 | + * |
|
105 | + * @return $this |
|
106 | + */ |
|
107 | + public function setFullWidth($fullWidth) |
|
108 | + { |
|
109 | + $this->fullWidth = ! ! $fullWidth; |
|
110 | + |
|
111 | + return $this; |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * @return Expr |
|
116 | + */ |
|
117 | + public function getOnClick() |
|
118 | + { |
|
119 | + return $this->onClick; |
|
120 | + } |
|
121 | + |
|
122 | + /** |
|
123 | + * @param string $onClick |
|
124 | + * |
|
125 | + * @return $this |
|
126 | + */ |
|
127 | + public function setOnClick($onClick) |
|
128 | + { |
|
129 | + $this->onClick = new Expr(strval($onClick)); |
|
130 | + |
|
131 | + return $this; |
|
132 | + } |
|
133 | + |
|
134 | + /** |
|
135 | + * @return Expr |
|
136 | + */ |
|
137 | + public function getOnHover() |
|
138 | + { |
|
139 | + return $this->onHover; |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * @param string $onHover |
|
144 | + * |
|
145 | + * @return $this |
|
146 | + */ |
|
147 | + public function setOnHover($onHover) |
|
148 | + { |
|
149 | + $this->onHover = new Expr(strval($onHover)); |
|
150 | + |
|
151 | + return $this; |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * @return LabelsCollection |
|
156 | + */ |
|
157 | + public function labels() |
|
158 | + { |
|
159 | + if (is_null($this->labels)) { |
|
160 | + $this->labels = new LabelsCollection(); |
|
161 | + } |
|
162 | + |
|
163 | + return $this->labels; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * @return boolean |
|
168 | + */ |
|
169 | + public function isReverse() |
|
170 | + { |
|
171 | + return $this->reverse; |
|
172 | + } |
|
173 | + |
|
174 | + /** |
|
175 | + * @param boolean $reverse |
|
176 | + * |
|
177 | + * @return $this |
|
178 | + */ |
|
179 | + public function setReverse($reverse) |
|
180 | + { |
|
181 | + $this->reverse = ! ! $reverse; |
|
182 | + |
|
183 | + return $this; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @return string |
|
188 | + */ |
|
189 | + public function jsonSerialize() |
|
190 | + { |
|
191 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
192 | + } |
|
193 | 193 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function setDisplay($display) |
68 | 68 | { |
69 | - $this->display = ! ! $display; |
|
69 | + $this->display = !!$display; |
|
70 | 70 | |
71 | 71 | return $this; |
72 | 72 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function setFullWidth($fullWidth) |
108 | 108 | { |
109 | - $this->fullWidth = ! ! $fullWidth; |
|
109 | + $this->fullWidth = !!$fullWidth; |
|
110 | 110 | |
111 | 111 | return $this; |
112 | 112 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function setReverse($reverse) |
180 | 180 | { |
181 | - $this->reverse = ! ! $reverse; |
|
181 | + $this->reverse = !!$reverse; |
|
182 | 182 | |
183 | 183 | return $this; |
184 | 184 | } |
@@ -13,313 +13,313 @@ |
||
13 | 13 | */ |
14 | 14 | class Callbacks implements ArraySerializableInterface, \JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - /** |
|
19 | - * @var Expr |
|
20 | - */ |
|
21 | - private $beforeTitle; |
|
22 | - |
|
23 | - /** |
|
24 | - * @var Expr |
|
25 | - */ |
|
26 | - private $title; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var Expr |
|
30 | - */ |
|
31 | - private $afterTitle; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var Expr |
|
35 | - */ |
|
36 | - private $beforeLabel; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var Expr |
|
40 | - */ |
|
41 | - private $label; |
|
42 | - |
|
43 | - /** |
|
44 | - * @var Expr |
|
45 | - */ |
|
46 | - private $labelColor; |
|
47 | - |
|
48 | - /** |
|
49 | - * @var Expr |
|
50 | - */ |
|
51 | - private $afterLabel; |
|
52 | - |
|
53 | - /** |
|
54 | - * @var Expr |
|
55 | - */ |
|
56 | - private $afterBody; |
|
57 | - |
|
58 | - /** |
|
59 | - * @var Expr |
|
60 | - */ |
|
61 | - private $beforeFooter; |
|
62 | - |
|
63 | - /** |
|
64 | - * @var Expr |
|
65 | - */ |
|
66 | - private $footer; |
|
67 | - |
|
68 | - /** |
|
69 | - * @var Expr |
|
70 | - */ |
|
71 | - private $afterFooter; |
|
72 | - |
|
73 | - /** |
|
74 | - * @var Expr |
|
75 | - */ |
|
76 | - private $dataPoints; |
|
77 | - |
|
78 | - /** |
|
79 | - * @return Expr |
|
80 | - */ |
|
81 | - public function getBeforeTitle() |
|
82 | - { |
|
83 | - return $this->beforeTitle; |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * @param string $beforeTitle |
|
88 | - * |
|
89 | - * @return $this |
|
90 | - */ |
|
91 | - public function setBeforeTitle($beforeTitle) |
|
92 | - { |
|
93 | - $this->beforeTitle = new Expr(strval($beforeTitle)); |
|
94 | - |
|
95 | - return $this; |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * @return Expr |
|
100 | - */ |
|
101 | - public function getTitle() |
|
102 | - { |
|
103 | - return $this->title; |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * @param string $title |
|
108 | - * |
|
109 | - * @return $this |
|
110 | - */ |
|
111 | - public function setTitle($title) |
|
112 | - { |
|
113 | - $this->title = new Expr(strval($title)); |
|
114 | - |
|
115 | - return $this; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @return Expr |
|
120 | - */ |
|
121 | - public function getAfterTitle() |
|
122 | - { |
|
123 | - return $this->afterTitle; |
|
124 | - } |
|
125 | - |
|
126 | - /** |
|
127 | - * @param string $afterTitle |
|
128 | - * |
|
129 | - * @return $this |
|
130 | - */ |
|
131 | - public function setAfterTitle($afterTitle) |
|
132 | - { |
|
133 | - $this->afterTitle = new Expr(strval($afterTitle)); |
|
134 | - |
|
135 | - return $this; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return Expr |
|
140 | - */ |
|
141 | - public function getBeforeLabel() |
|
142 | - { |
|
143 | - return $this->beforeLabel; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $beforeLabel |
|
148 | - * |
|
149 | - * @return $this |
|
150 | - */ |
|
151 | - public function setBeforeLabel($beforeLabel) |
|
152 | - { |
|
153 | - $this->beforeLabel = new Expr(strval($beforeLabel)); |
|
154 | - |
|
155 | - return $this; |
|
156 | - } |
|
157 | - |
|
158 | - /** |
|
159 | - * @return Expr |
|
160 | - */ |
|
161 | - public function getLabel() |
|
162 | - { |
|
163 | - return $this->label; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * @param string $label |
|
168 | - * |
|
169 | - * @return $this |
|
170 | - */ |
|
171 | - public function setLabel($label) |
|
172 | - { |
|
173 | - $this->label = new Expr(strval($label)); |
|
174 | - |
|
175 | - return $this; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @return Expr |
|
180 | - */ |
|
181 | - public function getLabelColor() |
|
182 | - { |
|
183 | - return $this->labelColor; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @param string $labelColor |
|
188 | - * |
|
189 | - * @return $this |
|
190 | - */ |
|
191 | - public function setLabelColor($labelColor) |
|
192 | - { |
|
193 | - $this->labelColor = new Expr(strval($labelColor)); |
|
194 | - |
|
195 | - return $this; |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * @return Expr |
|
200 | - */ |
|
201 | - public function getAfterLabel() |
|
202 | - { |
|
203 | - return $this->afterLabel; |
|
204 | - } |
|
205 | - |
|
206 | - /** |
|
207 | - * @param string $afterLabel |
|
208 | - * |
|
209 | - * @return $this |
|
210 | - */ |
|
211 | - public function setAfterLabel($afterLabel) |
|
212 | - { |
|
213 | - $this->afterLabel = new Expr(strval($afterLabel)); |
|
214 | - |
|
215 | - return $this; |
|
216 | - } |
|
217 | - |
|
218 | - /** |
|
219 | - * @return Expr |
|
220 | - */ |
|
221 | - public function getAfterBody() |
|
222 | - { |
|
223 | - return $this->afterBody; |
|
224 | - } |
|
225 | - |
|
226 | - /** |
|
227 | - * @param string $afterBody |
|
228 | - * |
|
229 | - * @return $this |
|
230 | - */ |
|
231 | - public function setAfterBody($afterBody) |
|
232 | - { |
|
233 | - $this->afterBody = new Expr(strval($afterBody)); |
|
234 | - |
|
235 | - return $this; |
|
236 | - } |
|
237 | - |
|
238 | - /** |
|
239 | - * @return Expr |
|
240 | - */ |
|
241 | - public function getBeforeFooter() |
|
242 | - { |
|
243 | - return $this->beforeFooter; |
|
244 | - } |
|
245 | - |
|
246 | - /** |
|
247 | - * @param string $beforeFooter |
|
248 | - * |
|
249 | - * @return $this |
|
250 | - */ |
|
251 | - public function setBeforeFooter($beforeFooter) |
|
252 | - { |
|
253 | - $this->beforeFooter = new Expr(strval($beforeFooter)); |
|
254 | - |
|
255 | - return $this; |
|
256 | - } |
|
257 | - |
|
258 | - /** |
|
259 | - * @return Expr |
|
260 | - */ |
|
261 | - public function getFooter() |
|
262 | - { |
|
263 | - return $this->footer; |
|
264 | - } |
|
265 | - |
|
266 | - /** |
|
267 | - * @param string $footer |
|
268 | - * |
|
269 | - * @return $this |
|
270 | - */ |
|
271 | - public function setFooter($footer) |
|
272 | - { |
|
273 | - $this->footer = new Expr(strval($footer)); |
|
274 | - |
|
275 | - return $this; |
|
276 | - } |
|
277 | - |
|
278 | - /** |
|
279 | - * @return Expr |
|
280 | - */ |
|
281 | - public function getAfterFooter() |
|
282 | - { |
|
283 | - return $this->afterFooter; |
|
284 | - } |
|
285 | - |
|
286 | - /** |
|
287 | - * @param string $afterFooter |
|
288 | - * |
|
289 | - * @return $this |
|
290 | - */ |
|
291 | - public function setAfterFooter($afterFooter) |
|
292 | - { |
|
293 | - $this->afterFooter = new Expr(strval($afterFooter)); |
|
294 | - |
|
295 | - return $this; |
|
296 | - } |
|
297 | - |
|
298 | - /** |
|
299 | - * @return Expr |
|
300 | - */ |
|
301 | - public function getDataPoints() |
|
302 | - { |
|
303 | - return $this->dataPoints; |
|
304 | - } |
|
305 | - |
|
306 | - /** |
|
307 | - * @param string $dataPoints |
|
308 | - * |
|
309 | - * @return $this |
|
310 | - */ |
|
311 | - public function setDataPoints($dataPoints) |
|
312 | - { |
|
313 | - $this->dataPoints = new Expr(strval($dataPoints)); |
|
314 | - |
|
315 | - return $this; |
|
316 | - } |
|
317 | - |
|
318 | - /** |
|
319 | - * @return string |
|
320 | - */ |
|
321 | - public function jsonSerialize() |
|
322 | - { |
|
323 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
324 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + /** |
|
19 | + * @var Expr |
|
20 | + */ |
|
21 | + private $beforeTitle; |
|
22 | + |
|
23 | + /** |
|
24 | + * @var Expr |
|
25 | + */ |
|
26 | + private $title; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var Expr |
|
30 | + */ |
|
31 | + private $afterTitle; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var Expr |
|
35 | + */ |
|
36 | + private $beforeLabel; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var Expr |
|
40 | + */ |
|
41 | + private $label; |
|
42 | + |
|
43 | + /** |
|
44 | + * @var Expr |
|
45 | + */ |
|
46 | + private $labelColor; |
|
47 | + |
|
48 | + /** |
|
49 | + * @var Expr |
|
50 | + */ |
|
51 | + private $afterLabel; |
|
52 | + |
|
53 | + /** |
|
54 | + * @var Expr |
|
55 | + */ |
|
56 | + private $afterBody; |
|
57 | + |
|
58 | + /** |
|
59 | + * @var Expr |
|
60 | + */ |
|
61 | + private $beforeFooter; |
|
62 | + |
|
63 | + /** |
|
64 | + * @var Expr |
|
65 | + */ |
|
66 | + private $footer; |
|
67 | + |
|
68 | + /** |
|
69 | + * @var Expr |
|
70 | + */ |
|
71 | + private $afterFooter; |
|
72 | + |
|
73 | + /** |
|
74 | + * @var Expr |
|
75 | + */ |
|
76 | + private $dataPoints; |
|
77 | + |
|
78 | + /** |
|
79 | + * @return Expr |
|
80 | + */ |
|
81 | + public function getBeforeTitle() |
|
82 | + { |
|
83 | + return $this->beforeTitle; |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * @param string $beforeTitle |
|
88 | + * |
|
89 | + * @return $this |
|
90 | + */ |
|
91 | + public function setBeforeTitle($beforeTitle) |
|
92 | + { |
|
93 | + $this->beforeTitle = new Expr(strval($beforeTitle)); |
|
94 | + |
|
95 | + return $this; |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * @return Expr |
|
100 | + */ |
|
101 | + public function getTitle() |
|
102 | + { |
|
103 | + return $this->title; |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * @param string $title |
|
108 | + * |
|
109 | + * @return $this |
|
110 | + */ |
|
111 | + public function setTitle($title) |
|
112 | + { |
|
113 | + $this->title = new Expr(strval($title)); |
|
114 | + |
|
115 | + return $this; |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @return Expr |
|
120 | + */ |
|
121 | + public function getAfterTitle() |
|
122 | + { |
|
123 | + return $this->afterTitle; |
|
124 | + } |
|
125 | + |
|
126 | + /** |
|
127 | + * @param string $afterTitle |
|
128 | + * |
|
129 | + * @return $this |
|
130 | + */ |
|
131 | + public function setAfterTitle($afterTitle) |
|
132 | + { |
|
133 | + $this->afterTitle = new Expr(strval($afterTitle)); |
|
134 | + |
|
135 | + return $this; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return Expr |
|
140 | + */ |
|
141 | + public function getBeforeLabel() |
|
142 | + { |
|
143 | + return $this->beforeLabel; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $beforeLabel |
|
148 | + * |
|
149 | + * @return $this |
|
150 | + */ |
|
151 | + public function setBeforeLabel($beforeLabel) |
|
152 | + { |
|
153 | + $this->beforeLabel = new Expr(strval($beforeLabel)); |
|
154 | + |
|
155 | + return $this; |
|
156 | + } |
|
157 | + |
|
158 | + /** |
|
159 | + * @return Expr |
|
160 | + */ |
|
161 | + public function getLabel() |
|
162 | + { |
|
163 | + return $this->label; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * @param string $label |
|
168 | + * |
|
169 | + * @return $this |
|
170 | + */ |
|
171 | + public function setLabel($label) |
|
172 | + { |
|
173 | + $this->label = new Expr(strval($label)); |
|
174 | + |
|
175 | + return $this; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @return Expr |
|
180 | + */ |
|
181 | + public function getLabelColor() |
|
182 | + { |
|
183 | + return $this->labelColor; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @param string $labelColor |
|
188 | + * |
|
189 | + * @return $this |
|
190 | + */ |
|
191 | + public function setLabelColor($labelColor) |
|
192 | + { |
|
193 | + $this->labelColor = new Expr(strval($labelColor)); |
|
194 | + |
|
195 | + return $this; |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * @return Expr |
|
200 | + */ |
|
201 | + public function getAfterLabel() |
|
202 | + { |
|
203 | + return $this->afterLabel; |
|
204 | + } |
|
205 | + |
|
206 | + /** |
|
207 | + * @param string $afterLabel |
|
208 | + * |
|
209 | + * @return $this |
|
210 | + */ |
|
211 | + public function setAfterLabel($afterLabel) |
|
212 | + { |
|
213 | + $this->afterLabel = new Expr(strval($afterLabel)); |
|
214 | + |
|
215 | + return $this; |
|
216 | + } |
|
217 | + |
|
218 | + /** |
|
219 | + * @return Expr |
|
220 | + */ |
|
221 | + public function getAfterBody() |
|
222 | + { |
|
223 | + return $this->afterBody; |
|
224 | + } |
|
225 | + |
|
226 | + /** |
|
227 | + * @param string $afterBody |
|
228 | + * |
|
229 | + * @return $this |
|
230 | + */ |
|
231 | + public function setAfterBody($afterBody) |
|
232 | + { |
|
233 | + $this->afterBody = new Expr(strval($afterBody)); |
|
234 | + |
|
235 | + return $this; |
|
236 | + } |
|
237 | + |
|
238 | + /** |
|
239 | + * @return Expr |
|
240 | + */ |
|
241 | + public function getBeforeFooter() |
|
242 | + { |
|
243 | + return $this->beforeFooter; |
|
244 | + } |
|
245 | + |
|
246 | + /** |
|
247 | + * @param string $beforeFooter |
|
248 | + * |
|
249 | + * @return $this |
|
250 | + */ |
|
251 | + public function setBeforeFooter($beforeFooter) |
|
252 | + { |
|
253 | + $this->beforeFooter = new Expr(strval($beforeFooter)); |
|
254 | + |
|
255 | + return $this; |
|
256 | + } |
|
257 | + |
|
258 | + /** |
|
259 | + * @return Expr |
|
260 | + */ |
|
261 | + public function getFooter() |
|
262 | + { |
|
263 | + return $this->footer; |
|
264 | + } |
|
265 | + |
|
266 | + /** |
|
267 | + * @param string $footer |
|
268 | + * |
|
269 | + * @return $this |
|
270 | + */ |
|
271 | + public function setFooter($footer) |
|
272 | + { |
|
273 | + $this->footer = new Expr(strval($footer)); |
|
274 | + |
|
275 | + return $this; |
|
276 | + } |
|
277 | + |
|
278 | + /** |
|
279 | + * @return Expr |
|
280 | + */ |
|
281 | + public function getAfterFooter() |
|
282 | + { |
|
283 | + return $this->afterFooter; |
|
284 | + } |
|
285 | + |
|
286 | + /** |
|
287 | + * @param string $afterFooter |
|
288 | + * |
|
289 | + * @return $this |
|
290 | + */ |
|
291 | + public function setAfterFooter($afterFooter) |
|
292 | + { |
|
293 | + $this->afterFooter = new Expr(strval($afterFooter)); |
|
294 | + |
|
295 | + return $this; |
|
296 | + } |
|
297 | + |
|
298 | + /** |
|
299 | + * @return Expr |
|
300 | + */ |
|
301 | + public function getDataPoints() |
|
302 | + { |
|
303 | + return $this->dataPoints; |
|
304 | + } |
|
305 | + |
|
306 | + /** |
|
307 | + * @param string $dataPoints |
|
308 | + * |
|
309 | + * @return $this |
|
310 | + */ |
|
311 | + public function setDataPoints($dataPoints) |
|
312 | + { |
|
313 | + $this->dataPoints = new Expr(strval($dataPoints)); |
|
314 | + |
|
315 | + return $this; |
|
316 | + } |
|
317 | + |
|
318 | + /** |
|
319 | + * @return string |
|
320 | + */ |
|
321 | + public function jsonSerialize() |
|
322 | + { |
|
323 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
324 | + } |
|
325 | 325 | } |
@@ -13,213 +13,213 @@ |
||
13 | 13 | */ |
14 | 14 | class Labels implements ArraySerializableInterface, \JsonSerializable |
15 | 15 | { |
16 | - use ArraySerializable; |
|
17 | - |
|
18 | - /** |
|
19 | - * @var int |
|
20 | - */ |
|
21 | - private $boxWidth; |
|
22 | - |
|
23 | - /** |
|
24 | - * @var int |
|
25 | - */ |
|
26 | - private $fontSize; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var string |
|
30 | - */ |
|
31 | - private $fontStyle; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - private $fontColor; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var string |
|
40 | - */ |
|
41 | - private $fontFamily; |
|
42 | - |
|
43 | - /** |
|
44 | - * @var int |
|
45 | - */ |
|
46 | - private $padding; |
|
47 | - |
|
48 | - /** |
|
49 | - * @var Expr |
|
50 | - */ |
|
51 | - private $generateLabels; |
|
52 | - |
|
53 | - /** |
|
54 | - * @var bool |
|
55 | - */ |
|
56 | - private $usePointStyle; |
|
57 | - |
|
58 | - /** |
|
59 | - * @return int |
|
60 | - */ |
|
61 | - public function getBoxWidth() |
|
62 | - { |
|
63 | - return $this->boxWidth; |
|
64 | - } |
|
65 | - |
|
66 | - /** |
|
67 | - * @param int $boxWidth |
|
68 | - * |
|
69 | - * @return Labels |
|
70 | - */ |
|
71 | - public function setBoxWidth($boxWidth) |
|
72 | - { |
|
73 | - $this->boxWidth = intval($boxWidth); |
|
74 | - |
|
75 | - return $this; |
|
76 | - } |
|
77 | - |
|
78 | - /** |
|
79 | - * @return mixed |
|
80 | - */ |
|
81 | - public function getFontSize() |
|
82 | - { |
|
83 | - return $this->fontSize; |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * @param int $fontSize |
|
88 | - * |
|
89 | - * @return Labels |
|
90 | - */ |
|
91 | - public function setFontSize($fontSize) |
|
92 | - { |
|
93 | - $this->fontSize = intval($fontSize); |
|
94 | - |
|
95 | - return $this; |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * @return string |
|
100 | - */ |
|
101 | - public function getFontStyle() |
|
102 | - { |
|
103 | - return $this->fontStyle; |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * @param string $fontStyle |
|
108 | - * |
|
109 | - * @return Labels |
|
110 | - */ |
|
111 | - public function setFontStyle($fontStyle) |
|
112 | - { |
|
113 | - $this->fontStyle = strval($fontStyle); |
|
114 | - |
|
115 | - return $this; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @return string |
|
120 | - */ |
|
121 | - public function getFontColor() |
|
122 | - { |
|
123 | - return $this->fontColor; |
|
124 | - } |
|
125 | - |
|
126 | - /** |
|
127 | - * @param string $fontColor |
|
128 | - * |
|
129 | - * @return Labels |
|
130 | - */ |
|
131 | - public function setFontColor($fontColor) |
|
132 | - { |
|
133 | - $this->fontColor = strval($fontColor); |
|
134 | - |
|
135 | - return $this; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getFontFamily() |
|
142 | - { |
|
143 | - return $this->fontFamily; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $fontFamily |
|
148 | - * |
|
149 | - * @return Labels |
|
150 | - */ |
|
151 | - public function setFontFamily($fontFamily) |
|
152 | - { |
|
153 | - $this->fontFamily = strval($fontFamily); |
|
154 | - |
|
155 | - return $this; |
|
156 | - } |
|
157 | - |
|
158 | - /** |
|
159 | - * @return int |
|
160 | - */ |
|
161 | - public function getPadding() |
|
162 | - { |
|
163 | - return $this->padding; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * @param int $padding |
|
168 | - * |
|
169 | - * @return Labels |
|
170 | - */ |
|
171 | - public function setPadding($padding) |
|
172 | - { |
|
173 | - $this->padding = intval($padding); |
|
174 | - |
|
175 | - return $this; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @return Expr |
|
180 | - */ |
|
181 | - public function getGenerateLabels() |
|
182 | - { |
|
183 | - return $this->generateLabels; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @param string $generateLabels |
|
188 | - * |
|
189 | - * @return Labels |
|
190 | - */ |
|
191 | - public function setGenerateLabels($generateLabels) |
|
192 | - { |
|
193 | - $this->generateLabels = new Expr(strval($generateLabels)); |
|
194 | - |
|
195 | - return $this; |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * @return boolean |
|
200 | - */ |
|
201 | - public function isUsePointStyle() |
|
202 | - { |
|
203 | - return $this->usePointStyle; |
|
204 | - } |
|
205 | - |
|
206 | - /** |
|
207 | - * @param boolean $usePointStyle |
|
208 | - * |
|
209 | - * @return Labels |
|
210 | - */ |
|
211 | - public function setUsePointStyle($usePointStyle) |
|
212 | - { |
|
213 | - $this->usePointStyle = ! ! $usePointStyle; |
|
214 | - |
|
215 | - return $this; |
|
216 | - } |
|
217 | - |
|
218 | - /** |
|
219 | - * @return string |
|
220 | - */ |
|
221 | - public function jsonSerialize() |
|
222 | - { |
|
223 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
224 | - } |
|
16 | + use ArraySerializable; |
|
17 | + |
|
18 | + /** |
|
19 | + * @var int |
|
20 | + */ |
|
21 | + private $boxWidth; |
|
22 | + |
|
23 | + /** |
|
24 | + * @var int |
|
25 | + */ |
|
26 | + private $fontSize; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var string |
|
30 | + */ |
|
31 | + private $fontStyle; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + private $fontColor; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var string |
|
40 | + */ |
|
41 | + private $fontFamily; |
|
42 | + |
|
43 | + /** |
|
44 | + * @var int |
|
45 | + */ |
|
46 | + private $padding; |
|
47 | + |
|
48 | + /** |
|
49 | + * @var Expr |
|
50 | + */ |
|
51 | + private $generateLabels; |
|
52 | + |
|
53 | + /** |
|
54 | + * @var bool |
|
55 | + */ |
|
56 | + private $usePointStyle; |
|
57 | + |
|
58 | + /** |
|
59 | + * @return int |
|
60 | + */ |
|
61 | + public function getBoxWidth() |
|
62 | + { |
|
63 | + return $this->boxWidth; |
|
64 | + } |
|
65 | + |
|
66 | + /** |
|
67 | + * @param int $boxWidth |
|
68 | + * |
|
69 | + * @return Labels |
|
70 | + */ |
|
71 | + public function setBoxWidth($boxWidth) |
|
72 | + { |
|
73 | + $this->boxWidth = intval($boxWidth); |
|
74 | + |
|
75 | + return $this; |
|
76 | + } |
|
77 | + |
|
78 | + /** |
|
79 | + * @return mixed |
|
80 | + */ |
|
81 | + public function getFontSize() |
|
82 | + { |
|
83 | + return $this->fontSize; |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * @param int $fontSize |
|
88 | + * |
|
89 | + * @return Labels |
|
90 | + */ |
|
91 | + public function setFontSize($fontSize) |
|
92 | + { |
|
93 | + $this->fontSize = intval($fontSize); |
|
94 | + |
|
95 | + return $this; |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * @return string |
|
100 | + */ |
|
101 | + public function getFontStyle() |
|
102 | + { |
|
103 | + return $this->fontStyle; |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * @param string $fontStyle |
|
108 | + * |
|
109 | + * @return Labels |
|
110 | + */ |
|
111 | + public function setFontStyle($fontStyle) |
|
112 | + { |
|
113 | + $this->fontStyle = strval($fontStyle); |
|
114 | + |
|
115 | + return $this; |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @return string |
|
120 | + */ |
|
121 | + public function getFontColor() |
|
122 | + { |
|
123 | + return $this->fontColor; |
|
124 | + } |
|
125 | + |
|
126 | + /** |
|
127 | + * @param string $fontColor |
|
128 | + * |
|
129 | + * @return Labels |
|
130 | + */ |
|
131 | + public function setFontColor($fontColor) |
|
132 | + { |
|
133 | + $this->fontColor = strval($fontColor); |
|
134 | + |
|
135 | + return $this; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getFontFamily() |
|
142 | + { |
|
143 | + return $this->fontFamily; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $fontFamily |
|
148 | + * |
|
149 | + * @return Labels |
|
150 | + */ |
|
151 | + public function setFontFamily($fontFamily) |
|
152 | + { |
|
153 | + $this->fontFamily = strval($fontFamily); |
|
154 | + |
|
155 | + return $this; |
|
156 | + } |
|
157 | + |
|
158 | + /** |
|
159 | + * @return int |
|
160 | + */ |
|
161 | + public function getPadding() |
|
162 | + { |
|
163 | + return $this->padding; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * @param int $padding |
|
168 | + * |
|
169 | + * @return Labels |
|
170 | + */ |
|
171 | + public function setPadding($padding) |
|
172 | + { |
|
173 | + $this->padding = intval($padding); |
|
174 | + |
|
175 | + return $this; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @return Expr |
|
180 | + */ |
|
181 | + public function getGenerateLabels() |
|
182 | + { |
|
183 | + return $this->generateLabels; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @param string $generateLabels |
|
188 | + * |
|
189 | + * @return Labels |
|
190 | + */ |
|
191 | + public function setGenerateLabels($generateLabels) |
|
192 | + { |
|
193 | + $this->generateLabels = new Expr(strval($generateLabels)); |
|
194 | + |
|
195 | + return $this; |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * @return boolean |
|
200 | + */ |
|
201 | + public function isUsePointStyle() |
|
202 | + { |
|
203 | + return $this->usePointStyle; |
|
204 | + } |
|
205 | + |
|
206 | + /** |
|
207 | + * @param boolean $usePointStyle |
|
208 | + * |
|
209 | + * @return Labels |
|
210 | + */ |
|
211 | + public function setUsePointStyle($usePointStyle) |
|
212 | + { |
|
213 | + $this->usePointStyle = ! ! $usePointStyle; |
|
214 | + |
|
215 | + return $this; |
|
216 | + } |
|
217 | + |
|
218 | + /** |
|
219 | + * @return string |
|
220 | + */ |
|
221 | + public function jsonSerialize() |
|
222 | + { |
|
223 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
224 | + } |
|
225 | 225 | } |
@@ -210,7 +210,7 @@ |
||
210 | 210 | */ |
211 | 211 | public function setUsePointStyle($usePointStyle) |
212 | 212 | { |
213 | - $this->usePointStyle = ! ! $usePointStyle; |
|
213 | + $this->usePointStyle = !!$usePointStyle; |
|
214 | 214 | |
215 | 215 | return $this; |
216 | 216 | } |
@@ -11,25 +11,25 @@ |
||
11 | 11 | */ |
12 | 12 | class YAxisCollection extends ArrayAccess implements \JsonSerializable |
13 | 13 | { |
14 | - /** |
|
15 | - * @return array |
|
16 | - */ |
|
17 | - public function getArrayCopy() |
|
18 | - { |
|
19 | - $rows = []; |
|
20 | - foreach ($this->data as $row) { |
|
21 | - /** @var YAxis $row */ |
|
22 | - $rows[] = $row->getArrayCopy(); |
|
23 | - } |
|
14 | + /** |
|
15 | + * @return array |
|
16 | + */ |
|
17 | + public function getArrayCopy() |
|
18 | + { |
|
19 | + $rows = []; |
|
20 | + foreach ($this->data as $row) { |
|
21 | + /** @var YAxis $row */ |
|
22 | + $rows[] = $row->getArrayCopy(); |
|
23 | + } |
|
24 | 24 | |
25 | - return $rows; |
|
26 | - } |
|
25 | + return $rows; |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * @return string |
|
30 | - */ |
|
31 | - public function jsonSerialize() |
|
32 | - { |
|
33 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
34 | - } |
|
28 | + /** |
|
29 | + * @return string |
|
30 | + */ |
|
31 | + public function jsonSerialize() |
|
32 | + { |
|
33 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
34 | + } |
|
35 | 35 | } |
@@ -16,10 +16,10 @@ |
||
16 | 16 | */ |
17 | 17 | public function getArrayCopy() |
18 | 18 | { |
19 | - $rows = []; |
|
19 | + $rows = [ ]; |
|
20 | 20 | foreach ($this->data as $row) { |
21 | 21 | /** @var YAxis $row */ |
22 | - $rows[] = $row->getArrayCopy(); |
|
22 | + $rows[ ] = $row->getArrayCopy(); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | return $rows; |
@@ -14,463 +14,463 @@ |
||
14 | 14 | */ |
15 | 15 | class Ticks implements ArraySerializableInterface, \JsonSerializable |
16 | 16 | { |
17 | - use ArraySerializable; |
|
18 | - |
|
19 | - /** |
|
20 | - * @var float |
|
21 | - */ |
|
22 | - private $suggestedMin; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var bool |
|
26 | - */ |
|
27 | - private $beginAtZero; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var float |
|
31 | - */ |
|
32 | - private $stepSize; |
|
33 | - |
|
34 | - /** |
|
35 | - * @var bool |
|
36 | - */ |
|
37 | - private $autoSkip; |
|
38 | - |
|
39 | - /** |
|
40 | - * @var int |
|
41 | - */ |
|
42 | - private $autoSkipPadding; |
|
43 | - |
|
44 | - /** |
|
45 | - * @var Expr |
|
46 | - */ |
|
47 | - private $callback; |
|
48 | - |
|
49 | - /** |
|
50 | - * @var bool |
|
51 | - */ |
|
52 | - private $display; |
|
53 | - |
|
54 | - /** |
|
55 | - * @var string |
|
56 | - */ |
|
57 | - private $fontColor; |
|
58 | - |
|
59 | - /** |
|
60 | - * @var string |
|
61 | - */ |
|
62 | - private $fontFamily; |
|
63 | - |
|
64 | - /** |
|
65 | - * @var int |
|
66 | - */ |
|
67 | - private $fontSize; |
|
68 | - |
|
69 | - /** |
|
70 | - * @var string |
|
71 | - */ |
|
72 | - private $fontStyle; |
|
73 | - |
|
74 | - /** |
|
75 | - * @var int |
|
76 | - */ |
|
77 | - private $labelOffset; |
|
78 | - |
|
79 | - /** |
|
80 | - * @var int |
|
81 | - */ |
|
82 | - private $maxRotation; |
|
83 | - |
|
84 | - /** |
|
85 | - * @var int |
|
86 | - */ |
|
87 | - private $minRotation; |
|
88 | - |
|
89 | - /** |
|
90 | - * @var bool |
|
91 | - */ |
|
92 | - private $mirror; |
|
93 | - |
|
94 | - /** |
|
95 | - * @var int |
|
96 | - */ |
|
97 | - private $padding; |
|
98 | - |
|
99 | - /** |
|
100 | - * @var bool |
|
101 | - */ |
|
102 | - private $reverse; |
|
103 | - |
|
104 | - /** |
|
105 | - * @var int |
|
106 | - */ |
|
107 | - private $max; |
|
108 | - |
|
109 | - /** |
|
110 | - * @return float |
|
111 | - */ |
|
112 | - public function getSuggestedMin() |
|
113 | - { |
|
114 | - return $this->suggestedMin; |
|
115 | - } |
|
116 | - |
|
117 | - /** |
|
118 | - * @param float $suggestedMin |
|
119 | - * |
|
120 | - * @return $this |
|
121 | - */ |
|
122 | - public function setSuggestedMin($suggestedMin) |
|
123 | - { |
|
124 | - $this->suggestedMin = floatval($suggestedMin); |
|
125 | - |
|
126 | - return $this; |
|
127 | - } |
|
128 | - |
|
129 | - /** |
|
130 | - * @return boolean |
|
131 | - */ |
|
132 | - public function isBeginAtZero() |
|
133 | - { |
|
134 | - return $this->beginAtZero; |
|
135 | - } |
|
136 | - |
|
137 | - /** |
|
138 | - * @param boolean $beginAtZero |
|
139 | - * |
|
140 | - * @return $this |
|
141 | - */ |
|
142 | - public function setBeginAtZero($beginAtZero) |
|
143 | - { |
|
144 | - $this->beginAtZero = boolval($beginAtZero); |
|
145 | - |
|
146 | - return $this; |
|
147 | - } |
|
148 | - |
|
149 | - /** |
|
150 | - * @return float |
|
151 | - */ |
|
152 | - public function getStepSize() |
|
153 | - { |
|
154 | - return $this->stepSize; |
|
155 | - } |
|
156 | - |
|
157 | - /** |
|
158 | - * @param float $stepSize |
|
159 | - * |
|
160 | - * @return $this |
|
161 | - */ |
|
162 | - public function setStepSize($stepSize) |
|
163 | - { |
|
164 | - $this->stepSize = floatval($stepSize); |
|
165 | - |
|
166 | - return $this; |
|
167 | - } |
|
168 | - |
|
169 | - /** |
|
170 | - * @return boolean |
|
171 | - */ |
|
172 | - public function isAutoSkip() |
|
173 | - { |
|
174 | - return $this->autoSkip; |
|
175 | - } |
|
176 | - |
|
177 | - /** |
|
178 | - * @param boolean $autoSkip |
|
179 | - * |
|
180 | - * @return $this |
|
181 | - */ |
|
182 | - public function setAutoSkip($autoSkip) |
|
183 | - { |
|
184 | - $this->autoSkip = ! ! $autoSkip; |
|
185 | - |
|
186 | - return $this; |
|
187 | - } |
|
188 | - |
|
189 | - /** |
|
190 | - * @return int |
|
191 | - */ |
|
192 | - public function getAutoSkipPadding() |
|
193 | - { |
|
194 | - return $this->autoSkipPadding; |
|
195 | - } |
|
196 | - |
|
197 | - /** |
|
198 | - * @param int $autoSkipPadding |
|
199 | - * |
|
200 | - * @return $this |
|
201 | - */ |
|
202 | - public function setAutoSkipPadding($autoSkipPadding) |
|
203 | - { |
|
204 | - $this->autoSkipPadding = intval($autoSkipPadding); |
|
205 | - |
|
206 | - return $this; |
|
207 | - } |
|
208 | - |
|
209 | - /** |
|
210 | - * @return Expr |
|
211 | - */ |
|
212 | - public function getCallback() |
|
213 | - { |
|
214 | - return $this->callback; |
|
215 | - } |
|
216 | - |
|
217 | - /** |
|
218 | - * @param string $callback |
|
219 | - * |
|
220 | - * @return $this |
|
221 | - */ |
|
222 | - public function setCallback($callback) |
|
223 | - { |
|
224 | - $this->callback = new Expr(strval($callback)); |
|
225 | - |
|
226 | - return $this; |
|
227 | - } |
|
228 | - |
|
229 | - /** |
|
230 | - * @return boolean |
|
231 | - */ |
|
232 | - public function isDisplay() |
|
233 | - { |
|
234 | - return $this->display; |
|
235 | - } |
|
236 | - |
|
237 | - /** |
|
238 | - * @param boolean $display |
|
239 | - * |
|
240 | - * @return $this |
|
241 | - */ |
|
242 | - public function setDisplay($display) |
|
243 | - { |
|
244 | - $this->display = ! ! $display; |
|
245 | - |
|
246 | - return $this; |
|
247 | - } |
|
248 | - |
|
249 | - /** |
|
250 | - * @return string |
|
251 | - */ |
|
252 | - public function getFontColor() |
|
253 | - { |
|
254 | - return $this->fontColor; |
|
255 | - } |
|
256 | - |
|
257 | - /** |
|
258 | - * @param string $fontColor |
|
259 | - * |
|
260 | - * @return $this |
|
261 | - */ |
|
262 | - public function setFontColor($fontColor) |
|
263 | - { |
|
264 | - $this->fontColor = strval($fontColor); |
|
265 | - |
|
266 | - return $this; |
|
267 | - } |
|
268 | - |
|
269 | - /** |
|
270 | - * @return string |
|
271 | - */ |
|
272 | - public function getFontFamily() |
|
273 | - { |
|
274 | - return $this->fontFamily; |
|
275 | - } |
|
276 | - |
|
277 | - /** |
|
278 | - * @param string $fontFamily |
|
279 | - * |
|
280 | - * @return $this |
|
281 | - */ |
|
282 | - public function setFontFamily($fontFamily) |
|
283 | - { |
|
284 | - $this->fontFamily = strval($fontFamily); |
|
285 | - |
|
286 | - return $this; |
|
287 | - } |
|
288 | - |
|
289 | - /** |
|
290 | - * @return int |
|
291 | - */ |
|
292 | - public function getFontSize() |
|
293 | - { |
|
294 | - return $this->fontSize; |
|
295 | - } |
|
296 | - |
|
297 | - /** |
|
298 | - * @param int $fontSize |
|
299 | - * |
|
300 | - * @return $this |
|
301 | - */ |
|
302 | - public function setFontSize($fontSize) |
|
303 | - { |
|
304 | - $this->fontSize = intval($fontSize); |
|
305 | - |
|
306 | - return $this; |
|
307 | - } |
|
308 | - |
|
309 | - /** |
|
310 | - * @return string |
|
311 | - */ |
|
312 | - public function getFontStyle() |
|
313 | - { |
|
314 | - return $this->fontStyle; |
|
315 | - } |
|
316 | - |
|
317 | - /** |
|
318 | - * @param string $fontStyle |
|
319 | - * |
|
320 | - * @return $this |
|
321 | - */ |
|
322 | - public function setFontStyle($fontStyle) |
|
323 | - { |
|
324 | - $this->fontStyle = strval($fontStyle); |
|
325 | - |
|
326 | - return $this; |
|
327 | - } |
|
328 | - |
|
329 | - /** |
|
330 | - * @return int |
|
331 | - */ |
|
332 | - public function getLabelOffset() |
|
333 | - { |
|
334 | - return $this->labelOffset; |
|
335 | - } |
|
336 | - |
|
337 | - /** |
|
338 | - * @param int $labelOffset |
|
339 | - * |
|
340 | - * @return $this |
|
341 | - */ |
|
342 | - public function setLabelOffset($labelOffset) |
|
343 | - { |
|
344 | - $this->labelOffset = intval($labelOffset); |
|
345 | - |
|
346 | - return $this; |
|
347 | - } |
|
348 | - |
|
349 | - /** |
|
350 | - * @return int |
|
351 | - */ |
|
352 | - public function getMaxRotation() |
|
353 | - { |
|
354 | - return $this->maxRotation; |
|
355 | - } |
|
356 | - |
|
357 | - /** |
|
358 | - * @param int $maxRotation |
|
359 | - * |
|
360 | - * @return $this |
|
361 | - */ |
|
362 | - public function setMaxRotation($maxRotation) |
|
363 | - { |
|
364 | - $this->maxRotation = intval($maxRotation); |
|
365 | - |
|
366 | - return $this; |
|
367 | - } |
|
368 | - |
|
369 | - /** |
|
370 | - * @return int |
|
371 | - */ |
|
372 | - public function getMinRotation() |
|
373 | - { |
|
374 | - return $this->minRotation; |
|
375 | - } |
|
376 | - |
|
377 | - /** |
|
378 | - * @param int $minRotation |
|
379 | - * |
|
380 | - * @return $this |
|
381 | - */ |
|
382 | - public function setMinRotation($minRotation) |
|
383 | - { |
|
384 | - $this->minRotation = intval($minRotation); |
|
385 | - |
|
386 | - return $this; |
|
387 | - } |
|
388 | - |
|
389 | - /** |
|
390 | - * @return boolean |
|
391 | - */ |
|
392 | - public function isMirror() |
|
393 | - { |
|
394 | - return $this->mirror; |
|
395 | - } |
|
396 | - |
|
397 | - /** |
|
398 | - * @param boolean $mirror |
|
399 | - * |
|
400 | - * @return $this |
|
401 | - */ |
|
402 | - public function setMirror($mirror) |
|
403 | - { |
|
404 | - $this->mirror = ! ! $mirror; |
|
405 | - |
|
406 | - return $this; |
|
407 | - } |
|
408 | - |
|
409 | - /** |
|
410 | - * @return int |
|
411 | - */ |
|
412 | - public function getPadding() |
|
413 | - { |
|
414 | - return $this->padding; |
|
415 | - } |
|
416 | - |
|
417 | - /** |
|
418 | - * @param int $padding |
|
419 | - * |
|
420 | - * @return $this |
|
421 | - */ |
|
422 | - public function setPadding($padding) |
|
423 | - { |
|
424 | - $this->padding = intval($padding); |
|
425 | - |
|
426 | - return $this; |
|
427 | - } |
|
428 | - |
|
429 | - /** |
|
430 | - * @return bool |
|
431 | - */ |
|
432 | - public function isReverse() |
|
433 | - { |
|
434 | - return $this->reverse; |
|
435 | - } |
|
436 | - |
|
437 | - /** |
|
438 | - * @param bool $reverse |
|
439 | - * |
|
440 | - * @return $this |
|
441 | - */ |
|
442 | - public function setReverse($reverse) |
|
443 | - { |
|
444 | - $this->reverse = ! ! $reverse; |
|
445 | - |
|
446 | - return $this; |
|
447 | - } |
|
448 | - |
|
449 | - /** |
|
450 | - * @return int |
|
451 | - */ |
|
452 | - public function getMax() |
|
453 | - { |
|
454 | - return $this->max; |
|
455 | - } |
|
456 | - |
|
457 | - /** |
|
458 | - * @param int $max |
|
459 | - * |
|
460 | - * @return $this |
|
461 | - */ |
|
462 | - public function setMax($max) |
|
463 | - { |
|
464 | - $this->max = intval($max); |
|
465 | - |
|
466 | - return $this; |
|
467 | - } |
|
468 | - |
|
469 | - /** |
|
470 | - * @return string |
|
471 | - */ |
|
472 | - public function jsonSerialize() |
|
473 | - { |
|
474 | - return Json::encode($this->getArrayCopy(), false, ['enableJsonExprFinder' => true]); |
|
475 | - } |
|
17 | + use ArraySerializable; |
|
18 | + |
|
19 | + /** |
|
20 | + * @var float |
|
21 | + */ |
|
22 | + private $suggestedMin; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var bool |
|
26 | + */ |
|
27 | + private $beginAtZero; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var float |
|
31 | + */ |
|
32 | + private $stepSize; |
|
33 | + |
|
34 | + /** |
|
35 | + * @var bool |
|
36 | + */ |
|
37 | + private $autoSkip; |
|
38 | + |
|
39 | + /** |
|
40 | + * @var int |
|
41 | + */ |
|
42 | + private $autoSkipPadding; |
|
43 | + |
|
44 | + /** |
|
45 | + * @var Expr |
|
46 | + */ |
|
47 | + private $callback; |
|
48 | + |
|
49 | + /** |
|
50 | + * @var bool |
|
51 | + */ |
|
52 | + private $display; |
|
53 | + |
|
54 | + /** |
|
55 | + * @var string |
|
56 | + */ |
|
57 | + private $fontColor; |
|
58 | + |
|
59 | + /** |
|
60 | + * @var string |
|
61 | + */ |
|
62 | + private $fontFamily; |
|
63 | + |
|
64 | + /** |
|
65 | + * @var int |
|
66 | + */ |
|
67 | + private $fontSize; |
|
68 | + |
|
69 | + /** |
|
70 | + * @var string |
|
71 | + */ |
|
72 | + private $fontStyle; |
|
73 | + |
|
74 | + /** |
|
75 | + * @var int |
|
76 | + */ |
|
77 | + private $labelOffset; |
|
78 | + |
|
79 | + /** |
|
80 | + * @var int |
|
81 | + */ |
|
82 | + private $maxRotation; |
|
83 | + |
|
84 | + /** |
|
85 | + * @var int |
|
86 | + */ |
|
87 | + private $minRotation; |
|
88 | + |
|
89 | + /** |
|
90 | + * @var bool |
|
91 | + */ |
|
92 | + private $mirror; |
|
93 | + |
|
94 | + /** |
|
95 | + * @var int |
|
96 | + */ |
|
97 | + private $padding; |
|
98 | + |
|
99 | + /** |
|
100 | + * @var bool |
|
101 | + */ |
|
102 | + private $reverse; |
|
103 | + |
|
104 | + /** |
|
105 | + * @var int |
|
106 | + */ |
|
107 | + private $max; |
|
108 | + |
|
109 | + /** |
|
110 | + * @return float |
|
111 | + */ |
|
112 | + public function getSuggestedMin() |
|
113 | + { |
|
114 | + return $this->suggestedMin; |
|
115 | + } |
|
116 | + |
|
117 | + /** |
|
118 | + * @param float $suggestedMin |
|
119 | + * |
|
120 | + * @return $this |
|
121 | + */ |
|
122 | + public function setSuggestedMin($suggestedMin) |
|
123 | + { |
|
124 | + $this->suggestedMin = floatval($suggestedMin); |
|
125 | + |
|
126 | + return $this; |
|
127 | + } |
|
128 | + |
|
129 | + /** |
|
130 | + * @return boolean |
|
131 | + */ |
|
132 | + public function isBeginAtZero() |
|
133 | + { |
|
134 | + return $this->beginAtZero; |
|
135 | + } |
|
136 | + |
|
137 | + /** |
|
138 | + * @param boolean $beginAtZero |
|
139 | + * |
|
140 | + * @return $this |
|
141 | + */ |
|
142 | + public function setBeginAtZero($beginAtZero) |
|
143 | + { |
|
144 | + $this->beginAtZero = boolval($beginAtZero); |
|
145 | + |
|
146 | + return $this; |
|
147 | + } |
|
148 | + |
|
149 | + /** |
|
150 | + * @return float |
|
151 | + */ |
|
152 | + public function getStepSize() |
|
153 | + { |
|
154 | + return $this->stepSize; |
|
155 | + } |
|
156 | + |
|
157 | + /** |
|
158 | + * @param float $stepSize |
|
159 | + * |
|
160 | + * @return $this |
|
161 | + */ |
|
162 | + public function setStepSize($stepSize) |
|
163 | + { |
|
164 | + $this->stepSize = floatval($stepSize); |
|
165 | + |
|
166 | + return $this; |
|
167 | + } |
|
168 | + |
|
169 | + /** |
|
170 | + * @return boolean |
|
171 | + */ |
|
172 | + public function isAutoSkip() |
|
173 | + { |
|
174 | + return $this->autoSkip; |
|
175 | + } |
|
176 | + |
|
177 | + /** |
|
178 | + * @param boolean $autoSkip |
|
179 | + * |
|
180 | + * @return $this |
|
181 | + */ |
|
182 | + public function setAutoSkip($autoSkip) |
|
183 | + { |
|
184 | + $this->autoSkip = ! ! $autoSkip; |
|
185 | + |
|
186 | + return $this; |
|
187 | + } |
|
188 | + |
|
189 | + /** |
|
190 | + * @return int |
|
191 | + */ |
|
192 | + public function getAutoSkipPadding() |
|
193 | + { |
|
194 | + return $this->autoSkipPadding; |
|
195 | + } |
|
196 | + |
|
197 | + /** |
|
198 | + * @param int $autoSkipPadding |
|
199 | + * |
|
200 | + * @return $this |
|
201 | + */ |
|
202 | + public function setAutoSkipPadding($autoSkipPadding) |
|
203 | + { |
|
204 | + $this->autoSkipPadding = intval($autoSkipPadding); |
|
205 | + |
|
206 | + return $this; |
|
207 | + } |
|
208 | + |
|
209 | + /** |
|
210 | + * @return Expr |
|
211 | + */ |
|
212 | + public function getCallback() |
|
213 | + { |
|
214 | + return $this->callback; |
|
215 | + } |
|
216 | + |
|
217 | + /** |
|
218 | + * @param string $callback |
|
219 | + * |
|
220 | + * @return $this |
|
221 | + */ |
|
222 | + public function setCallback($callback) |
|
223 | + { |
|
224 | + $this->callback = new Expr(strval($callback)); |
|
225 | + |
|
226 | + return $this; |
|
227 | + } |
|
228 | + |
|
229 | + /** |
|
230 | + * @return boolean |
|
231 | + */ |
|
232 | + public function isDisplay() |
|
233 | + { |
|
234 | + return $this->display; |
|
235 | + } |
|
236 | + |
|
237 | + /** |
|
238 | + * @param boolean $display |
|
239 | + * |
|
240 | + * @return $this |
|
241 | + */ |
|
242 | + public function setDisplay($display) |
|
243 | + { |
|
244 | + $this->display = ! ! $display; |
|
245 | + |
|
246 | + return $this; |
|
247 | + } |
|
248 | + |
|
249 | + /** |
|
250 | + * @return string |
|
251 | + */ |
|
252 | + public function getFontColor() |
|
253 | + { |
|
254 | + return $this->fontColor; |
|
255 | + } |
|
256 | + |
|
257 | + /** |
|
258 | + * @param string $fontColor |
|
259 | + * |
|
260 | + * @return $this |
|
261 | + */ |
|
262 | + public function setFontColor($fontColor) |
|
263 | + { |
|
264 | + $this->fontColor = strval($fontColor); |
|
265 | + |
|
266 | + return $this; |
|
267 | + } |
|
268 | + |
|
269 | + /** |
|
270 | + * @return string |
|
271 | + */ |
|
272 | + public function getFontFamily() |
|
273 | + { |
|
274 | + return $this->fontFamily; |
|
275 | + } |
|
276 | + |
|
277 | + /** |
|
278 | + * @param string $fontFamily |
|
279 | + * |
|
280 | + * @return $this |
|
281 | + */ |
|
282 | + public function setFontFamily($fontFamily) |
|
283 | + { |
|
284 | + $this->fontFamily = strval($fontFamily); |
|
285 | + |
|
286 | + return $this; |
|
287 | + } |
|
288 | + |
|
289 | + /** |
|
290 | + * @return int |
|
291 | + */ |
|
292 | + public function getFontSize() |
|
293 | + { |
|
294 | + return $this->fontSize; |
|
295 | + } |
|
296 | + |
|
297 | + /** |
|
298 | + * @param int $fontSize |
|
299 | + * |
|
300 | + * @return $this |
|
301 | + */ |
|
302 | + public function setFontSize($fontSize) |
|
303 | + { |
|
304 | + $this->fontSize = intval($fontSize); |
|
305 | + |
|
306 | + return $this; |
|
307 | + } |
|
308 | + |
|
309 | + /** |
|
310 | + * @return string |
|
311 | + */ |
|
312 | + public function getFontStyle() |
|
313 | + { |
|
314 | + return $this->fontStyle; |
|
315 | + } |
|
316 | + |
|
317 | + /** |
|
318 | + * @param string $fontStyle |
|
319 | + * |
|
320 | + * @return $this |
|
321 | + */ |
|
322 | + public function setFontStyle($fontStyle) |
|
323 | + { |
|
324 | + $this->fontStyle = strval($fontStyle); |
|
325 | + |
|
326 | + return $this; |
|
327 | + } |
|
328 | + |
|
329 | + /** |
|
330 | + * @return int |
|
331 | + */ |
|
332 | + public function getLabelOffset() |
|
333 | + { |
|
334 | + return $this->labelOffset; |
|
335 | + } |
|
336 | + |
|
337 | + /** |
|
338 | + * @param int $labelOffset |
|
339 | + * |
|
340 | + * @return $this |
|
341 | + */ |
|
342 | + public function setLabelOffset($labelOffset) |
|
343 | + { |
|
344 | + $this->labelOffset = intval($labelOffset); |
|
345 | + |
|
346 | + return $this; |
|
347 | + } |
|
348 | + |
|
349 | + /** |
|
350 | + * @return int |
|
351 | + */ |
|
352 | + public function getMaxRotation() |
|
353 | + { |
|
354 | + return $this->maxRotation; |
|
355 | + } |
|
356 | + |
|
357 | + /** |
|
358 | + * @param int $maxRotation |
|
359 | + * |
|
360 | + * @return $this |
|
361 | + */ |
|
362 | + public function setMaxRotation($maxRotation) |
|
363 | + { |
|
364 | + $this->maxRotation = intval($maxRotation); |
|
365 | + |
|
366 | + return $this; |
|
367 | + } |
|
368 | + |
|
369 | + /** |
|
370 | + * @return int |
|
371 | + */ |
|
372 | + public function getMinRotation() |
|
373 | + { |
|
374 | + return $this->minRotation; |
|
375 | + } |
|
376 | + |
|
377 | + /** |
|
378 | + * @param int $minRotation |
|
379 | + * |
|
380 | + * @return $this |
|
381 | + */ |
|
382 | + public function setMinRotation($minRotation) |
|
383 | + { |
|
384 | + $this->minRotation = intval($minRotation); |
|
385 | + |
|
386 | + return $this; |
|
387 | + } |
|
388 | + |
|
389 | + /** |
|
390 | + * @return boolean |
|
391 | + */ |
|
392 | + public function isMirror() |
|
393 | + { |
|
394 | + return $this->mirror; |
|
395 | + } |
|
396 | + |
|
397 | + /** |
|
398 | + * @param boolean $mirror |
|
399 | + * |
|
400 | + * @return $this |
|
401 | + */ |
|
402 | + public function setMirror($mirror) |
|
403 | + { |
|
404 | + $this->mirror = ! ! $mirror; |
|
405 | + |
|
406 | + return $this; |
|
407 | + } |
|
408 | + |
|
409 | + /** |
|
410 | + * @return int |
|
411 | + */ |
|
412 | + public function getPadding() |
|
413 | + { |
|
414 | + return $this->padding; |
|
415 | + } |
|
416 | + |
|
417 | + /** |
|
418 | + * @param int $padding |
|
419 | + * |
|
420 | + * @return $this |
|
421 | + */ |
|
422 | + public function setPadding($padding) |
|
423 | + { |
|
424 | + $this->padding = intval($padding); |
|
425 | + |
|
426 | + return $this; |
|
427 | + } |
|
428 | + |
|
429 | + /** |
|
430 | + * @return bool |
|
431 | + */ |
|
432 | + public function isReverse() |
|
433 | + { |
|
434 | + return $this->reverse; |
|
435 | + } |
|
436 | + |
|
437 | + /** |
|
438 | + * @param bool $reverse |
|
439 | + * |
|
440 | + * @return $this |
|
441 | + */ |
|
442 | + public function setReverse($reverse) |
|
443 | + { |
|
444 | + $this->reverse = ! ! $reverse; |
|
445 | + |
|
446 | + return $this; |
|
447 | + } |
|
448 | + |
|
449 | + /** |
|
450 | + * @return int |
|
451 | + */ |
|
452 | + public function getMax() |
|
453 | + { |
|
454 | + return $this->max; |
|
455 | + } |
|
456 | + |
|
457 | + /** |
|
458 | + * @param int $max |
|
459 | + * |
|
460 | + * @return $this |
|
461 | + */ |
|
462 | + public function setMax($max) |
|
463 | + { |
|
464 | + $this->max = intval($max); |
|
465 | + |
|
466 | + return $this; |
|
467 | + } |
|
468 | + |
|
469 | + /** |
|
470 | + * @return string |
|
471 | + */ |
|
472 | + public function jsonSerialize() |
|
473 | + { |
|
474 | + return Json::encode($this->getArrayCopy(), false, ['enableJsonExprFinder' => true]); |
|
475 | + } |
|
476 | 476 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | public function setAutoSkip($autoSkip) |
183 | 183 | { |
184 | - $this->autoSkip = ! ! $autoSkip; |
|
184 | + $this->autoSkip = !!$autoSkip; |
|
185 | 185 | |
186 | 186 | return $this; |
187 | 187 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | */ |
242 | 242 | public function setDisplay($display) |
243 | 243 | { |
244 | - $this->display = ! ! $display; |
|
244 | + $this->display = !!$display; |
|
245 | 245 | |
246 | 246 | return $this; |
247 | 247 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | */ |
402 | 402 | public function setMirror($mirror) |
403 | 403 | { |
404 | - $this->mirror = ! ! $mirror; |
|
404 | + $this->mirror = !!$mirror; |
|
405 | 405 | |
406 | 406 | return $this; |
407 | 407 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | */ |
442 | 442 | public function setReverse($reverse) |
443 | 443 | { |
444 | - $this->reverse = ! ! $reverse; |
|
444 | + $this->reverse = !!$reverse; |
|
445 | 445 | |
446 | 446 | return $this; |
447 | 447 | } |
@@ -471,6 +471,6 @@ discard block |
||
471 | 471 | */ |
472 | 472 | public function jsonSerialize() |
473 | 473 | { |
474 | - return Json::encode($this->getArrayCopy(), false, ['enableJsonExprFinder' => true]); |
|
474 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
475 | 475 | } |
476 | 476 | } |
@@ -11,61 +11,61 @@ |
||
11 | 11 | */ |
12 | 12 | class XAxis extends Scale |
13 | 13 | { |
14 | - /** |
|
15 | - * @var float |
|
16 | - */ |
|
17 | - private $categoryPercentage; |
|
14 | + /** |
|
15 | + * @var float |
|
16 | + */ |
|
17 | + private $categoryPercentage; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @var float |
|
21 | - */ |
|
22 | - private $barPercentage; |
|
19 | + /** |
|
20 | + * @var float |
|
21 | + */ |
|
22 | + private $barPercentage; |
|
23 | 23 | |
24 | - /** |
|
25 | - * @return float |
|
26 | - */ |
|
27 | - public function getCategoryPercentage() |
|
28 | - { |
|
29 | - return $this->categoryPercentage; |
|
30 | - } |
|
24 | + /** |
|
25 | + * @return float |
|
26 | + */ |
|
27 | + public function getCategoryPercentage() |
|
28 | + { |
|
29 | + return $this->categoryPercentage; |
|
30 | + } |
|
31 | 31 | |
32 | - /** |
|
33 | - * @param float $categoryPercentage |
|
34 | - * |
|
35 | - * @return $this |
|
36 | - */ |
|
37 | - public function setCategoryPercentage($categoryPercentage) |
|
38 | - { |
|
39 | - $this->categoryPercentage = floatval($categoryPercentage); |
|
32 | + /** |
|
33 | + * @param float $categoryPercentage |
|
34 | + * |
|
35 | + * @return $this |
|
36 | + */ |
|
37 | + public function setCategoryPercentage($categoryPercentage) |
|
38 | + { |
|
39 | + $this->categoryPercentage = floatval($categoryPercentage); |
|
40 | 40 | |
41 | - return $this; |
|
42 | - } |
|
41 | + return $this; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return float |
|
46 | - */ |
|
47 | - public function getBarPercentage() |
|
48 | - { |
|
49 | - return $this->barPercentage; |
|
50 | - } |
|
44 | + /** |
|
45 | + * @return float |
|
46 | + */ |
|
47 | + public function getBarPercentage() |
|
48 | + { |
|
49 | + return $this->barPercentage; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param float $barPercentage |
|
54 | - * |
|
55 | - * @return $this |
|
56 | - */ |
|
57 | - public function setBarPercentage($barPercentage) |
|
58 | - { |
|
59 | - $this->barPercentage = floatval($barPercentage); |
|
52 | + /** |
|
53 | + * @param float $barPercentage |
|
54 | + * |
|
55 | + * @return $this |
|
56 | + */ |
|
57 | + public function setBarPercentage($barPercentage) |
|
58 | + { |
|
59 | + $this->barPercentage = floatval($barPercentage); |
|
60 | 60 | |
61 | - return $this; |
|
62 | - } |
|
61 | + return $this; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @return string |
|
66 | - */ |
|
67 | - public function jsonSerialize() |
|
68 | - { |
|
69 | - return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
70 | - } |
|
64 | + /** |
|
65 | + * @return string |
|
66 | + */ |
|
67 | + public function jsonSerialize() |
|
68 | + { |
|
69 | + return Json::encode($this->getArrayCopy(), false, [ 'enableJsonExprFinder' => true ]); |
|
70 | + } |
|
71 | 71 | } |