@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | // Order the bounds. |
| 76 | 76 | usort( |
| 77 | 77 | $bounds, |
| 78 | - static function (array $d1, array $d2) { |
|
| 78 | + static function(array $d1, array $d2) { |
|
| 79 | 79 | return ($d1[0] < $d2[0]) ? -1 : 1; |
| 80 | 80 | } |
| 81 | 81 | ); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | { |
| 97 | 97 | $discreteValues = array_filter( |
| 98 | 98 | $intervals, |
| 99 | - static function ($interval) { |
|
| 99 | + static function($interval) { |
|
| 100 | 100 | return $interval[0] === $interval[1]; |
| 101 | 101 | } |
| 102 | 102 | ); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $newIntervals = array_values( |
| 170 | 170 | array_filter( |
| 171 | 171 | $newIntervals, |
| 172 | - static function ($i) { |
|
| 172 | + static function($i) { |
|
| 173 | 173 | // Use weak comparison in case of object typed bounds. |
| 174 | 174 | return $i[0] != $i[1]; |
| 175 | 175 | } |
@@ -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 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | public function getFlatIntervals(): array |
| 223 | 223 | { |
| 224 | - if (empty($this->flattened)){ |
|
| 224 | + if (empty($this->flattened)) { |
|
| 225 | 225 | $this->flattened = $this->flattener->flatten($this->intervals); |
| 226 | 226 | } |
| 227 | 227 | return $this->flattened; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | public function getAggregatedIntervals(): array |
| 236 | 236 | { |
| 237 | - if (empty($this->aggregated)){ |
|
| 237 | + if (empty($this->aggregated)) { |
|
| 238 | 238 | $this->aggregated = $this->aggregator->aggregate( |
| 239 | 239 | $this->getFlatIntervals(), |
| 240 | 240 | $this->intervals |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | // Order by low bound. |
| 269 | 269 | uasort( |
| 270 | 270 | $numVals, |
| 271 | - static function (array $i1, array $i2) { |
|
| 271 | + static function(array $i1, array $i2) { |
|
| 272 | 272 | return ($i1[0] < $i2[0]) ? -1 : 1; |
| 273 | 273 | } |
| 274 | 274 | ); |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | // Order by high bound. |
| 288 | 288 | uasort( |
| 289 | 289 | $numVals, |
| 290 | - static function (array $i1, array $i2) { |
|
| 290 | + static function(array $i1, array $i2) { |
|
| 291 | 291 | return ($i1[1] < $i2[1]) ? -1 : 1; |
| 292 | 292 | } |
| 293 | 293 | ); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | !empty($originalValues) ? $this->palette->getColor($colval) : 50, // Interval color |
| 328 | 328 | ($this->boundToString)($lowBound), // Interval start string value |
| 329 | 329 | ($this->boundToString)($highBound), // Interval end string value |
| 330 | - !empty($originalValues) ? $strval : null,// Interval string value |
|
| 330 | + !empty($originalValues) ? $strval : null, // Interval string value |
|
| 331 | 331 | ]; |
| 332 | 332 | } |
| 333 | 333 | } |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | // serialized as correctly ordered JSON arrays. |
| 338 | 338 | usort( |
| 339 | 339 | $numVals, |
| 340 | - static function ($i) { |
|
| 340 | + static function($i) { |
|
| 341 | 341 | return count($i) === 2 ? 1 : -1; |
| 342 | 342 | } |
| 343 | 343 | ); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | // Order by high bound. |
| 371 | 371 | uasort( |
| 372 | 372 | $numericIntervals, |
| 373 | - static function (array $i1, array $i2) { |
|
| 373 | + static function(array $i1, array $i2) { |
|
| 374 | 374 | return ($i1[1] < $i2[1]) ? -1 : 1; |
| 375 | 375 | } |
| 376 | 376 | ); |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | // serialized as correctly ordered JSON arrays. |
| 398 | 398 | usort( |
| 399 | 399 | $numericIntervals, |
| 400 | - static function ($i) { |
|
| 400 | + static function($i) { |
|
| 401 | 401 | return !is_array($i) ? 1 : -1; |
| 402 | 402 | } |
| 403 | 403 | ); |