@@ -27,16 +27,16 @@ |
||
| 27 | 27 | private static function createDeterminer(): Closure |
| 28 | 28 | { |
| 29 | 29 | if (function_exists('\AlecRabbit\WCWidth\wcswidth')) { |
| 30 | - return static function (string $string): int { |
|
| 30 | + return static function(string $string): int { |
|
| 31 | 31 | return wcswidth($string); |
| 32 | 32 | }; |
| 33 | 33 | } |
| 34 | 34 | if (function_exists('\mb_strlen')) { |
| 35 | - return static function (string $string): int { |
|
| 35 | + return static function(string $string): int { |
|
| 36 | 36 | return mb_strlen($string); |
| 37 | 37 | }; |
| 38 | 38 | } |
| 39 | - return static function (string $string): int { |
|
| 39 | + return static function(string $string): int { |
|
| 40 | 40 | return strlen($string); |
| 41 | 41 | }; |
| 42 | 42 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | (bool)( |
| 23 | 23 | ($error['type'] ?? 0) |
| 24 | 24 | & |
| 25 | - (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR) |
|
| 25 | + (E_ERROR|E_CORE_ERROR|E_COMPILE_ERROR|E_USER_ERROR|E_RECOVERABLE_ERROR) |
|
| 26 | 26 | ); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | protected function doCreateHandlers(ISpinner $spinner): iterable |
| 54 | 54 | { |
| 55 | 55 | yield from [ |
| 56 | - SIGINT => function () use ($spinner): void { |
|
| 56 | + SIGINT => function() use ($spinner): void { |
|
| 57 | 57 | $spinner->interrupt(); |
| 58 | 58 | $this->stop(); |
| 59 | 59 | }, |
@@ -45,12 +45,12 @@ |
||
| 45 | 45 | // Automatically run loop at end of program, unless already started or stopped explicitly. |
| 46 | 46 | // @codeCoverageIgnoreStart |
| 47 | 47 | $hasRun = false; |
| 48 | - EventLoop::defer(static function () use (&$hasRun): void { |
|
| 48 | + EventLoop::defer(static function() use (&$hasRun): void { |
|
| 49 | 49 | $hasRun = true; |
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | - $stopped =& self::$stopped; |
|
| 53 | - register_shutdown_function(static function () use (&$hasRun, &$stopped) { |
|
| 52 | + $stopped = & self::$stopped; |
|
| 53 | + register_shutdown_function(static function() use (&$hasRun, &$stopped) { |
|
| 54 | 54 | // Don't run if we're coming from a fatal error (uncaught exception). |
| 55 | 55 | if (self::error()) { |
| 56 | 56 | return; |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface IInterval |
| 8 | 8 | { |
| 9 | - final public const MIN_INTERVAL_MILLISECONDS = 10; // 10 milliseconds |
|
| 10 | - final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
| 9 | + final public const MIN_INTERVAL_MILLISECONDS = 10; // 10 milliseconds |
|
| 10 | + final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
| 11 | 11 | |
| 12 | 12 | public function toMicroseconds(): float; |
| 13 | 13 | |
@@ -436,7 +436,7 @@ |
||
| 436 | 436 | return 0; |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | - return (int)((round($b / 255) << 2) | (round($g / 255) << 1) | round($r / 255)); |
|
| 439 | + return (int)((round($b / 255) << 2)|(round($g / 255) << 1)|round($r / 255)); |
|
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | private function getSaturation(int $r, int $g, int $b): int |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function add(IWidgetComposite|IWidgetContext $element): IWidgetContext |
| 81 | 81 | { |
| 82 | 82 | $this->wrap( |
| 83 | - function () use ($element, &$result): void { |
|
| 83 | + function() use ($element, &$result): void { |
|
| 84 | 84 | $result = $this->rootWidget->add($element); |
| 85 | 85 | } |
| 86 | 86 | ); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | public function remove(IWidgetComposite|IWidgetContext $element): void |
| 117 | 117 | { |
| 118 | 118 | $this->wrap( |
| 119 | - function () use ($element) { |
|
| 119 | + function() use ($element) { |
|
| 120 | 120 | $this->rootWidget->remove($element); |
| 121 | 121 | } |
| 122 | 122 | ); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | protected const UPDATE_INTERVAL = 1000; |
| 18 | 18 | |
| 19 | 19 | /** @var array */ |
| 20 | - protected const PATTERN = [' ', ' u', 'un', 'nd', 'de', 'ef', 'fi', 'in', 'ne', 'ed', 'd ',]; |
|
| 20 | + protected const PATTERN = [' ', ' u', 'un', 'nd', 'de', 'ef', 'fi', 'in', 'ne', 'ed', 'd ', ]; |
|
| 21 | 21 | |
| 22 | 22 | public function __construct( |
| 23 | 23 | protected ?int $interval = null, |
@@ -12,5 +12,5 @@ |
||
| 12 | 12 | { |
| 13 | 13 | protected const UPDATE_INTERVAL = 120; |
| 14 | 14 | |
| 15 | - protected const PATTERN = ['⚀', '⚁', '⚂', '⚃', '⚄', '⚅',]; |
|
| 15 | + protected const PATTERN = ['⚀', '⚁', '⚂', '⚃', '⚄', '⚅', ]; |
|
| 16 | 16 | } |
@@ -11,5 +11,5 @@ |
||
| 11 | 11 | final class Ascii extends AReversiblePattern |
| 12 | 12 | { |
| 13 | 13 | protected const UPDATE_INTERVAL = 300; |
| 14 | - protected const PATTERN = ['/', '|', '\\', '─',]; |
|
| 14 | + protected const PATTERN = ['/', '|', '\\', '─', ]; |
|
| 15 | 15 | } |