@@ -64,19 +64,19 @@ discard block |
||
64 | 64 | $this->setIntervals($intervals); |
65 | 65 | } |
66 | 66 | |
67 | - $this->boundToNumeric = static function (DateTime $bound) { |
|
67 | + $this->boundToNumeric = static function(DateTime $bound) { |
|
68 | 68 | return $bound->getTimestamp(); |
69 | 69 | }; |
70 | 70 | |
71 | - $this->boundToString = static function (DateTime $bound) { |
|
71 | + $this->boundToString = static function(DateTime $bound) { |
|
72 | 72 | return $bound->format('Y-m-d'); |
73 | 73 | }; |
74 | 74 | |
75 | - $this->valueToNumeric = static function ($v) { |
|
75 | + $this->valueToNumeric = static function($v) { |
|
76 | 76 | return $v === null ? null : (int)($v * 100); |
77 | 77 | }; |
78 | 78 | |
79 | - $this->valueToString = static function ($v) { |
|
79 | + $this->valueToString = static function($v) { |
|
80 | 80 | return $v === null ? null : ($v * 100 . '%'); |
81 | 81 | }; |
82 | 82 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | */ |
226 | 226 | public function &getFlatIntervals(): array |
227 | 227 | { |
228 | - if (empty($this->flattened)){ |
|
228 | + if (empty($this->flattened)) { |
|
229 | 229 | $this->flattened = $this->flattener->flatten($this->intervals); |
230 | 230 | } |
231 | 231 | return $this->flattened; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function &getAggregatedIntervals(): array |
244 | 244 | { |
245 | - if (empty($this->aggregated)){ |
|
245 | + if (empty($this->aggregated)) { |
|
246 | 246 | $this->aggregated = $this->aggregator->aggregate( |
247 | 247 | $this->getFlatIntervals(), |
248 | 248 | $this->intervals |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | // Order by low bound. |
277 | 277 | uasort( |
278 | 278 | $numVals, |
279 | - static function (array $i1, array $i2) { |
|
279 | + static function(array $i1, array $i2) { |
|
280 | 280 | return ($i1[0] < $i2[0]) ? -1 : 1; |
281 | 281 | } |
282 | 282 | ); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | // Order by high bound. |
296 | 296 | uasort( |
297 | 297 | $numVals, |
298 | - static function (array $i1, array $i2) { |
|
298 | + static function(array $i1, array $i2) { |
|
299 | 299 | return ($i1[1] < $i2[1]) ? -1 : 1; |
300 | 300 | } |
301 | 301 | ); |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | !empty($originalValues) ? $this->palette->getColor($colval) : 50, // Interval color |
336 | 336 | ($this->boundToString)($lowBound), // Interval start string value |
337 | 337 | ($this->boundToString)($highBound), // Interval end string value |
338 | - !empty($originalValues) ? $strval : null,// Interval string value |
|
338 | + !empty($originalValues) ? $strval : null, // Interval string value |
|
339 | 339 | ]; |
340 | 340 | } |
341 | 341 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | // serialized as correctly ordered JSON arrays. |
346 | 346 | usort( |
347 | 347 | $numVals, |
348 | - static function ($i) { |
|
348 | + static function($i) { |
|
349 | 349 | return count($i) === 2 ? 1 : -1; |
350 | 350 | } |
351 | 351 | ); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | // Order by high bound. |
379 | 379 | uasort( |
380 | 380 | $numericIntervals, |
381 | - static function (array $i1, array $i2) { |
|
381 | + static function(array $i1, array $i2) { |
|
382 | 382 | return ($i1[1] < $i2[1]) ? -1 : 1; |
383 | 383 | } |
384 | 384 | ); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | // serialized as correctly ordered JSON arrays. |
406 | 406 | usort( |
407 | 407 | $numericIntervals, |
408 | - static function ($i) { |
|
408 | + static function($i) { |
|
409 | 409 | return !is_array($i) ? 1 : -1; |
410 | 410 | } |
411 | 411 | ); |