From caa1f51892faac781dc548da5e3e4b08dba92808 Mon Sep 17 00:00:00 2001 From: Angger Pradana Date: Tue, 20 Aug 2024 14:23:04 +0700 Subject: [PATCH] formatting (#367) --- src/System/Console/helper.php | 2 +- src/System/Http/Request.php | 2 -- tests/Cron/BasicCronTest.php | 2 +- tests/Cron/CronTimeTest.php | 2 +- tests/Cron/ScheduleTest.php | 2 +- tests/Integrate/Commands/CronCommandsTest.php | 4 ++-- tests/Integrate/Http/KarnelTest.php | 6 +++--- tests/Support/MacroTest.php | 2 +- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/System/Console/helper.php b/src/System/Console/helper.php index 7218caa9..e300c423 100644 --- a/src/System/Console/helper.php +++ b/src/System/Console/helper.php @@ -156,7 +156,7 @@ function any_key($title, callable $callable) */ function width(int $min, int $max): int { - $terminal = new class() { + $terminal = new class { use TerminalTrait; public function width(int $min, int $max): int diff --git a/src/System/Http/Request.php b/src/System/Http/Request.php index 504e02e1..3d0a516b 100644 --- a/src/System/Http/Request.php +++ b/src/System/Http/Request.php @@ -119,7 +119,6 @@ class Request implements \ArrayAccess, \IteratorAggregate * @param array $cookies * @param array $files * @param array $headers - * @param ?string $rawBody */ public function __construct( string $url, @@ -145,7 +144,6 @@ public function __construct( * @param array $cookies * @param array $files * @param array $headers - * @param ?string $rawBody * * @return self */ diff --git a/tests/Cron/BasicCronTest.php b/tests/Cron/BasicCronTest.php index 3a0c7ebf..1382bb40 100644 --- a/tests/Cron/BasicCronTest.php +++ b/tests/Cron/BasicCronTest.php @@ -11,7 +11,7 @@ final class BasicCronTest extends TestCase protected function setUp(): void { - $this->logger = new class() implements InterpolateInterface { + $this->logger = new class implements InterpolateInterface { public function interpolate(string $message, array $context = []): void { echo 'works'; diff --git a/tests/Cron/CronTimeTest.php b/tests/Cron/CronTimeTest.php index 05d985e6..280e3828 100644 --- a/tests/Cron/CronTimeTest.php +++ b/tests/Cron/CronTimeTest.php @@ -12,7 +12,7 @@ final class CronTimeTest extends TestCase protected function setUp(): void { - $this->logger = new class() implements InterpolateInterface { + $this->logger = new class implements InterpolateInterface { public function interpolate(string $message, array $context = []): void { echo 'works'; diff --git a/tests/Cron/ScheduleTest.php b/tests/Cron/ScheduleTest.php index 4475f8d2..90b977b6 100644 --- a/tests/Cron/ScheduleTest.php +++ b/tests/Cron/ScheduleTest.php @@ -13,7 +13,7 @@ final class ScheduleTest extends TestCase protected function setUp(): void { - $this->logger = new class() implements InterpolateInterface { + $this->logger = new class implements InterpolateInterface { public function interpolate(string $message, array $context = []): void { echo 'works'; diff --git a/tests/Integrate/Commands/CronCommandsTest.php b/tests/Integrate/Commands/CronCommandsTest.php index e4ba7952..58200387 100644 --- a/tests/Integrate/Commands/CronCommandsTest.php +++ b/tests/Integrate/Commands/CronCommandsTest.php @@ -16,7 +16,7 @@ final class CronCommandsTest extends CommandTest protected function setUp(): void { parent::setUp(); - $log = new class() implements InterpolateInterface { + $log = new class implements InterpolateInterface { /** * @param array $context */ @@ -41,7 +41,7 @@ private function maker(string $argv): CronCommand public function __construct($argv) { parent::__construct($argv); - $this->log = new class() implements InterpolateInterface { + $this->log = new class implements InterpolateInterface { /** * @param array $context */ diff --git a/tests/Integrate/Http/KarnelTest.php b/tests/Integrate/Http/KarnelTest.php index 20eba603..c0432ed2 100644 --- a/tests/Integrate/Http/KarnelTest.php +++ b/tests/Integrate/Http/KarnelTest.php @@ -37,19 +37,19 @@ protected function dispatcher(Request $request): array 'callable' => fn () => new Response('ok', 200), 'parameters' => [], 'middleware' => [ - new class() { + new class { public function handle(Request $request, Closure $next): Response { return $next($request); } }, - new class() { + new class { public function handle(Request $request, Closure $next): Response { return new Response('redirect', 303); } }, - new class() { + new class { public function handle(Request $request, Closure $next): Response { if ($respone = $next($request)) { diff --git a/tests/Support/MacroTest.php b/tests/Support/MacroTest.php index e86a597e..50368652 100644 --- a/tests/Support/MacroTest.php +++ b/tests/Support/MacroTest.php @@ -10,7 +10,7 @@ final class MacroTest extends TestCase protected function setUp(): void { - $this->mock_class = new class() { + $this->mock_class = new class { use Marco; }; }