@@ -73,7 +73,7 @@ |
||
73 | 73 | $bounds[] = [$interval[0], '+', true, $key, $interval[2] ?? null]; |
74 | 74 | } |
75 | 75 | // Order the bounds. |
76 | - usort($bounds, static function (array $d1, array $d2) { |
|
76 | + usort($bounds, static function(array $d1, array $d2) { |
|
77 | 77 | return ($d1[0] < $d2[0]) ? -1 : 1; |
78 | 78 | }); |
79 | 79 | return $bounds; |
@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | public function __construct() |
41 | 41 | { |
42 | - $this->aggregateFunction = static function ($a, $b) { |
|
42 | + $this->aggregateFunction = static function($a, $b) { |
|
43 | 43 | if ($a === null && $b === null) { |
44 | 44 | return null; |
45 | 45 | } |
@@ -58,19 +58,19 @@ discard block |
||
58 | 58 | $this->setIntervals($intervals); |
59 | 59 | } |
60 | 60 | |
61 | - $this->boundToNumeric = static function (DateTime $bound) { |
|
61 | + $this->boundToNumeric = static function(DateTime $bound) { |
|
62 | 62 | return $bound->getTimestamp(); |
63 | 63 | }; |
64 | 64 | |
65 | - $this->boundToString = static function (DateTime $bound) { |
|
65 | + $this->boundToString = static function(DateTime $bound) { |
|
66 | 66 | return $bound->format('Y-m-d'); |
67 | 67 | }; |
68 | 68 | |
69 | - $this->valueToNumeric = static function ($v) { |
|
69 | + $this->valueToNumeric = static function($v) { |
|
70 | 70 | return $v === null ? null : (int)($v * 100); |
71 | 71 | }; |
72 | 72 | |
73 | - $this->valueToString = static function ($v) { |
|
73 | + $this->valueToString = static function($v) { |
|
74 | 74 | return $v === null ? null : ($v * 100 . '%'); |
75 | 75 | }; |
76 | 76 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | // Order by low bound. |
236 | - uasort($numVals, static function (array $i1, array $i2) { |
|
236 | + uasort($numVals, static function(array $i1, array $i2) { |
|
237 | 237 | return ($i1[0] < $i2[0]) ? -1 : 1; |
238 | 238 | }); |
239 | 239 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | // Order by high bound. |
252 | - uasort($numVals, static function (array $i1, array $i2) { |
|
252 | + uasort($numVals, static function(array $i1, array $i2) { |
|
253 | 253 | return ($i1[1] < $i2[1]) ? -1 : 1; |
254 | 254 | }); |
255 | 255 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | !empty($originalValues) ? $this->palette->getColor($colval) : 50, // Interval color |
293 | 293 | ($this->boundToString)($lowBound), // Interval start string value |
294 | 294 | ($this->boundToString)($highBound), // Interval end string value |
295 | - !empty($originalValues) ? $strval : null,// Interval string value |
|
295 | + !empty($originalValues) ? $strval : null, // Interval string value |
|
296 | 296 | ]; |
297 | 297 | } |
298 | 298 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | // Put discrete values at the end and reset indices. |
301 | 301 | // Reseting indices ensures the processed values are |
302 | 302 | // serialized as correctly ordered JSON arrays. |
303 | - usort($numVals, static function ($i) { |
|
303 | + usort($numVals, static function($i) { |
|
304 | 304 | return count($i) === 2 ? 1 : -1; |
305 | 305 | }); |
306 | 306 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $adjacentIntervals = $this->flattener->calcAdjacentIntervals($this->intervals); |
322 | 322 | |
323 | 323 | // Remove empty interval generated when two or more intervals share a common bound. |
324 | - $adjacentIntervals = array_values(array_filter($adjacentIntervals, static function ($i) { |
|
324 | + $adjacentIntervals = array_values(array_filter($adjacentIntervals, static function($i) { |
|
325 | 325 | // Use weak comparison in case of object typed bounds. |
326 | 326 | return $i[0] != $i[1]; |
327 | 327 | })); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | */ |
350 | 350 | public static function extractDiscreteValues(array &$intervals): array |
351 | 351 | { |
352 | - $discreteValues = array_filter($intervals, static function ($interval) { |
|
352 | + $discreteValues = array_filter($intervals, static function($interval) { |
|
353 | 353 | return $interval[0] === $interval[1]; |
354 | 354 | }); |
355 | 355 | |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | |
381 | 381 | // Order by high bound. |
382 | - uasort($numericIntervals, static function (array $i1, array $i2) { |
|
382 | + uasort($numericIntervals, static function(array $i1, array $i2) { |
|
383 | 383 | return ($i1[1] < $i2[1]) ? -1 : 1; |
384 | 384 | }); |
385 | 385 | |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | // Put discrete values at the end and reset indices. |
409 | 409 | // Reseting indices ensures the processed values are |
410 | 410 | // serialized as correctly ordered JSON arrays. |
411 | - usort($numericIntervals, static function ($i) { |
|
411 | + usort($numericIntervals, static function($i) { |
|
412 | 412 | return !is_array($i) ? 1 : -1; |
413 | 413 | }); |
414 | 414 |