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 | * Set data main prefix (€, $, etc.). |
||
47 | * |
||
48 | * @param string $mainPrefix |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | 1 | public function setMainPrefix($mainPrefix) |
|
58 | |||
59 | /** |
||
60 | * Get data main prefix (€, $, etc.). |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | 7 | public function getMainPrefix() |
|
68 | |||
69 | /** |
||
70 | * Set main value. |
||
71 | * |
||
72 | * @param int $mainValue |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | 3 | public function setMainValue($mainValue) |
|
82 | |||
83 | /** |
||
84 | * Get main value. |
||
85 | * |
||
86 | * @return int |
||
87 | */ |
||
88 | 7 | public function getMainValue() |
|
92 | |||
93 | /** |
||
94 | * Set the primary text value. (Visible if widget is 2x2 |
||
95 | * or 1x1 without a secondary value). |
||
96 | * |
||
97 | * @param string $mainText The text body |
||
98 | * |
||
99 | * @return NumberAndSecondaryStat |
||
100 | */ |
||
101 | 1 | public function setMainText($mainText) |
|
107 | |||
108 | /** |
||
109 | * Return the main text body. |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | 1 | public function getMainText() |
|
117 | |||
118 | /** |
||
119 | * Set secondary value. |
||
120 | * |
||
121 | * @param int $secondaryValue |
||
122 | * |
||
123 | * @return $this |
||
124 | */ |
||
125 | 2 | public function setSecondaryValue($secondaryValue) |
|
131 | |||
132 | /** |
||
133 | * Get secondary value. |
||
134 | * |
||
135 | * @return string |
||
136 | */ |
||
137 | 7 | public function getSecondaryValue() |
|
141 | |||
142 | /** |
||
143 | * Set the secondary text value. (Visible if widget is 2x2). |
||
144 | * |
||
145 | * @param string $secondaryText The text body |
||
146 | * |
||
147 | * @return NumberAndSecondaryStat |
||
148 | */ |
||
149 | 1 | public function setSecondaryText($secondaryText) |
|
155 | |||
156 | /** |
||
157 | * Return the secondary text body. |
||
158 | * |
||
159 | * @return string |
||
160 | */ |
||
161 | 1 | public function getSecondaryText() |
|
165 | |||
166 | /** |
||
167 | * @param string|null $prefix |
||
168 | * |
||
169 | * @return $this |
||
170 | */ |
||
171 | 1 | public function setType($prefix) |
|
177 | |||
178 | /** |
||
179 | * @return string|null |
||
180 | */ |
||
181 | 7 | public function getType() |
|
185 | |||
186 | /** |
||
187 | * Mark this widget as absolute. |
||
188 | * |
||
189 | * @param bool $absolute The absolute value |
||
190 | * |
||
191 | * @return NumberAndSecondaryStat |
||
192 | */ |
||
193 | 1 | public function setAbsolute($absolute) |
|
199 | |||
200 | /** |
||
201 | * {@inheritdoc} |
||
202 | */ |
||
203 | 7 | public function getData() |
|
236 | } |
||
237 |
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..