| @@ -178,7 +178,7 @@ discard block | ||
| 178 | 178 | */ | 
| 179 | 179 | public function getVariable(string $name): mixed | 
| 180 | 180 |      { | 
| 181 | -        if (! array_key_exists($name, $this->variables)) { | |
| 181 | +        if (!array_key_exists($name, $this->variables)) { | |
| 182 | 182 |              if ($this->variableNotFoundHandler !== null) { | 
| 183 | 183 | return call_user_func($this->variableNotFoundHandler, $name); | 
| 184 | 184 | } | 
| @@ -377,7 +377,7 @@ discard block | ||
| 377 | 377 | 'uNeg' => [static fn($a) => 0 - $a, 200, false], | 
| 378 | 378 | '*' => [static fn($a, $b) => $a * $b, 180, false], | 
| 379 | 379 | '/' => [ | 
| 380 | -                static function ($a, $b) { | |
| 380 | +                static function($a, $b) { | |
| 381 | 381 |                      if ($b == 0) { | 
| 382 | 382 | throw new DivisionByZeroException(); | 
| 383 | 383 | } | 
| @@ -397,7 +397,7 @@ discard block | ||
| 397 | 397 | '>' => [static fn($a, $b) => $a > $b, 150, false], | 
| 398 | 398 | '<=' => [static fn($a, $b) => $a <= $b, 150, false], | 
| 399 | 399 | '<' => [static fn($a, $b) => $a < $b, 150, false], | 
| 400 | - '!' => [static fn($a) => ! $a, 190, false], | |
| 400 | + '!' => [static fn($a) => !$a, 190, false], | |
| 401 | 401 | ]; | 
| 402 | 402 | } | 
| 403 | 403 | |
| @@ -408,14 +408,14 @@ discard block | ||
| 408 | 408 | protected function defaultFunctions(): array | 
| 409 | 409 |      { | 
| 410 | 410 | return [ | 
| 411 | -            'abs' => static function ($arg) { | |
| 411 | +            'abs' => static function($arg) { | |
| 412 | 412 |                  if ((int) $arg == $arg) { | 
| 413 | 413 | return abs(intval($arg)); | 
| 414 | 414 | } | 
| 415 | 415 | return abs(floatval($arg)); | 
| 416 | 416 | }, | 
| 417 | 417 | 'array' => static fn(...$args) => $args, | 
| 418 | -            'avg' => static function ($arg1, ...$args) { | |
| 418 | +            'avg' => static function($arg1, ...$args) { | |
| 419 | 419 |                  if (is_array($arg1)) { | 
| 420 | 420 |                      if (count($arg1) === 0) { | 
| 421 | 421 |                          throw new InvalidArgumentException('Array must contains at least one element'); | 
| @@ -427,13 +427,13 @@ discard block | ||
| 427 | 427 | $args = [$arg1, ...array_values($args)]; | 
| 428 | 428 | return array_sum($args) / count($args); | 
| 429 | 429 | }, | 
| 430 | -            'ceil' => static function ($arg) { | |
| 430 | +            'ceil' => static function($arg) { | |
| 431 | 431 |                  if ((int) $arg == $arg) { | 
| 432 | 432 | return ceil(intval($arg)); | 
| 433 | 433 | } | 
| 434 | 434 | return ceil(floatval($arg)); | 
| 435 | 435 | }, | 
| 436 | -            'floor' => static function ($arg) { | |
| 436 | +            'floor' => static function($arg) { | |
| 437 | 437 |                  if ((int) $arg == $arg) { | 
| 438 | 438 | return floor(intval($arg)); | 
| 439 | 439 | } | 
| @@ -449,22 +449,22 @@ discard block | ||
| 449 | 449 | 'sqrt' => static fn($arg) => sqrt(floatval($arg)), | 
| 450 | 450 | 'hypot' => static fn($arg1, $arg2) => hypot(floatval($arg1), floatval($arg2)), | 
| 451 | 451 | 'intdiv' => static fn($arg1, $arg2) => intdiv(intval($arg1), intval($arg2)), | 
| 452 | -            'max' => static function ($arg1, ...$args) { | |
| 452 | +            'max' => static function($arg1, ...$args) { | |
| 453 | 453 |                  if (is_array($arg1) && count($arg1) === 0) { | 
| 454 | 454 |                      throw new InvalidArgumentException('Array must contains at least one element'); | 
| 455 | 455 | } | 
| 456 | 456 | |
| 457 | 457 | return max(is_array($arg1) && count($arg1) > 0 ? $arg1 : [$arg1, ...array_values($args)]); | 
| 458 | 458 | }, | 
| 459 | -            'min' => static function ($arg1, ...$args) { | |
| 459 | +            'min' => static function($arg1, ...$args) { | |
| 460 | 460 |                  if (is_array($arg1) && count($arg1) === 0) { | 
| 461 | 461 |                      throw new InvalidArgumentException('Array must contains at least one element'); | 
| 462 | 462 | } | 
| 463 | 463 | |
| 464 | - return min(is_array($arg1) && count($arg1) > 0 ? $arg1 : [$arg1, ...array_values($args)]); | |
| 464 | + return min(is_array($arg1) && count($arg1) > 0 ? $arg1 : [$arg1, ...array_values($args)]); | |
| 465 | 465 | }, | 
| 466 | 466 | 'pow' => static fn($arg1, $arg2) => $arg1 ** $arg2, | 
| 467 | -            'round' => static function ($arg, int $precision = 0) { | |
| 467 | +            'round' => static function($arg, int $precision = 0) { | |
| 468 | 468 |                  if ((int) $arg == $arg) { | 
| 469 | 469 | return round(intval($arg), intval($precision)); | 
| 470 | 470 | } |