1 | <?php |
||
8 | class NumberAndSecondaryStat extends Widget |
||
9 | { |
||
10 | const TYPE_REGULAR = null; |
||
11 | const TYPE_REVERSE = 'reverse'; |
||
12 | |||
13 | /** |
||
14 | * @var null Main value |
||
15 | */ |
||
16 | private $mainValue = null; |
||
17 | /** |
||
18 | * @var null Secondary value |
||
19 | */ |
||
20 | private $secondaryValue = null; |
||
21 | /** |
||
22 | * @var null Main value prefix |
||
23 | */ |
||
24 | private $mainPrefix = null; |
||
25 | /** |
||
26 | * @var null Main value prefix |
||
27 | */ |
||
28 | private $type = null; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $mainText = ''; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $secondaryText = ''; |
||
39 | |||
40 | /** |
||
41 | * @var bool |
||
42 | */ |
||
43 | private $absolute = false; |
||
44 | |||
45 | /** |
||
46 | * @var boolean |
||
47 | */ |
||
48 | private $displayAsTimeDuration = false; |
||
49 | |||
50 | /** |
||
51 | * Set data main prefix (€, $, etc.). |
||
52 | * |
||
53 | * @param string $mainPrefix |
||
54 | * |
||
55 | * @return $this |
||
56 | */ |
||
57 | 1 | public function setMainPrefix($mainPrefix) |
|
63 | |||
64 | /** |
||
65 | * Get data main prefix (€, $, etc.). |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 8 | public function getMainPrefix() |
|
73 | |||
74 | /** |
||
75 | * Set main value. |
||
76 | * |
||
77 | * @param int $mainValue |
||
78 | * |
||
79 | * @return $this |
||
80 | */ |
||
81 | 3 | public function setMainValue($mainValue) |
|
87 | |||
88 | /** |
||
89 | * Get main value. |
||
90 | * |
||
91 | * @return int |
||
92 | */ |
||
93 | 8 | public function getMainValue() |
|
97 | |||
98 | /** |
||
99 | * Set the primary text value. (Visible if widget is 2x2 |
||
100 | * or 1x1 without a secondary value). |
||
101 | * |
||
102 | * @param string $mainText The text body |
||
103 | * |
||
104 | * @return NumberAndSecondaryStat |
||
105 | */ |
||
106 | 1 | public function setMainText($mainText) |
|
112 | |||
113 | /** |
||
114 | * Return the main text body. |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | 1 | public function getMainText() |
|
122 | |||
123 | /** |
||
124 | * Set secondary value. |
||
125 | * |
||
126 | * @param int $secondaryValue |
||
127 | * |
||
128 | * @return $this |
||
129 | */ |
||
130 | 2 | public function setSecondaryValue($secondaryValue) |
|
136 | |||
137 | /** |
||
138 | * Get secondary value. |
||
139 | * |
||
140 | * @return string |
||
141 | */ |
||
142 | 8 | public function getSecondaryValue() |
|
146 | |||
147 | /** |
||
148 | * Set the secondary text value. (Visible if widget is 2x2). |
||
149 | * |
||
150 | * @param string $secondaryText The text body |
||
151 | * |
||
152 | * @return NumberAndSecondaryStat |
||
153 | */ |
||
154 | 1 | public function setSecondaryText($secondaryText) |
|
160 | |||
161 | /** |
||
162 | * Return the secondary text body. |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | 1 | public function getSecondaryText() |
|
170 | |||
171 | /** |
||
172 | * @param string|null $prefix |
||
173 | * |
||
174 | * @return $this |
||
175 | */ |
||
176 | 1 | public function setType($prefix) |
|
182 | |||
183 | /** |
||
184 | * @return string|null |
||
185 | */ |
||
186 | 8 | public function getType() |
|
190 | |||
191 | /** |
||
192 | * Mark this widget as absolute. |
||
193 | * |
||
194 | * @param bool $absolute The absolute value |
||
195 | * |
||
196 | * @return NumberAndSecondaryStat |
||
197 | */ |
||
198 | 1 | public function setAbsolute($absolute) |
|
204 | |||
205 | /** |
||
206 | * Mark this widget for display main value as time duration (from milliseconds). |
||
207 | * |
||
208 | * @param boolean $displayAsTimeDuration |
||
209 | * |
||
210 | * @return NumberAndSecondaryStat |
||
211 | */ |
||
212 | 1 | public function setDisplayAsTimeDuration($displayAsTimeDuration) |
|
218 | |||
219 | /** |
||
220 | * {@inheritdoc} |
||
221 | */ |
||
222 | 8 | public function getData() |
|
259 | } |
||
260 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..