From 34978e32cd0af770aa228620c677068c8cdabdf6 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Tue, 1 Apr 2025 22:04:31 +0300 Subject: [PATCH] Added void typo --- tests/Commands/EventsTest.php | 4 +- tests/Commands/MakeTest.php | 16 +++--- tests/Commands/MutexTest.php | 8 +-- tests/Commands/OperationsTest.php | 50 +++++++++---------- tests/Commands/RefreshTest.php | 2 +- tests/Commands/ResetTest.php | 2 +- tests/Commands/RollbackTest.php | 16 +++--- tests/Commands/StatusTest.php | 2 +- tests/Helpers/GitTest.php | 4 +- ...2_15_124237_test_success_transactions.stub | 2 +- ...02_15_124852_test_failed_transactions.stub | 2 +- .../2020_12_07_164624_create_test_table.php | 4 +- ...1_01_02_022431_create_every_time_table.php | 4 +- ...02_15_124419_create_transactions_table.php | 4 +- ..._05_24_122027_create_environment_table.php | 4 +- ...2021_12_23_165218_create_success_table.php | 4 +- .../2021_12_23_184434_create_failed_table.php | 4 +- .../2022_08_17_150549_create_before_table.php | 4 +- 18 files changed, 68 insertions(+), 68 deletions(-) diff --git a/tests/Commands/EventsTest.php b/tests/Commands/EventsTest.php index 0e650272..ff69686c 100644 --- a/tests/Commands/EventsTest.php +++ b/tests/Commands/EventsTest.php @@ -15,7 +15,7 @@ class EventsTest extends TestCase { - public function testSuccess() + public function testSuccess(): void { $this->copyFiles(); @@ -29,7 +29,7 @@ public function testSuccess() Event::assertNotDispatched(DeployOperationFailed::class); } - public function testFailed() + public function testFailed(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('Custom exception'); diff --git a/tests/Commands/MakeTest.php b/tests/Commands/MakeTest.php index 615ea20e..8177b96d 100644 --- a/tests/Commands/MakeTest.php +++ b/tests/Commands/MakeTest.php @@ -10,7 +10,7 @@ class MakeTest extends TestCase { - public function testMakingFiles() + public function testMakingFiles(): void { $name = 'MakeExample'; @@ -28,7 +28,7 @@ public function testMakingFiles() ); } - public function testAskedName() + public function testAskedName(): void { $path = $this->getOperationsPath() . '/' . date('Y_m_d_His') . '_some_name.php'; @@ -41,7 +41,7 @@ public function testAskedName() $this->assertFileExists($path); } - public function testAutoName() + public function testAutoName(): void { $path = $this->getOperationsPath() . '/' . date('Y_m_d_His') . '_auto.php'; @@ -54,7 +54,7 @@ public function testAutoName() $this->assertFileExists($path); } - public function testNestedRightSlashWithoutExtension() + public function testNestedRightSlashWithoutExtension(): void { $name = 'Foo/bar/QweRty'; @@ -72,7 +72,7 @@ public function testNestedRightSlashWithoutExtension() ); } - public function testNestedRightSlashWithExtension() + public function testNestedRightSlashWithExtension(): void { $name = 'Foo/bar/QweRty.php'; @@ -90,7 +90,7 @@ public function testNestedRightSlashWithExtension() ); } - public function testNestedLeftSlashWithoutExtension() + public function testNestedLeftSlashWithoutExtension(): void { $name = 'Foo\\bar\\QweRty'; @@ -108,7 +108,7 @@ public function testNestedLeftSlashWithoutExtension() ); } - public function testNestedLeftSlashWithExtension() + public function testNestedLeftSlashWithExtension(): void { $name = 'Foo\\bar\\QweRty.php'; @@ -126,7 +126,7 @@ public function testNestedLeftSlashWithExtension() ); } - public function testFromCustomizedStub() + public function testFromCustomizedStub(): void { $name = 'MakeExample'; diff --git a/tests/Commands/MutexTest.php b/tests/Commands/MutexTest.php index a3d5ce7a..11453ffd 100644 --- a/tests/Commands/MutexTest.php +++ b/tests/Commands/MutexTest.php @@ -39,7 +39,7 @@ public function handle(): int $this->command->setLaravel($container); } - public function testCanRunIsolatedCommandIfNotBlocked() + public function testCanRunIsolatedCommandIfNotBlocked(): void { $this->mutex->shouldReceive('create') ->andReturn(true) @@ -53,7 +53,7 @@ public function testCanRunIsolatedCommandIfNotBlocked() $this->assertSame(1, $this->command->ran); } - public function testCannotRunIsolatedCommandIfBlocked() + public function testCannotRunIsolatedCommandIfBlocked(): void { $this->mutex->shouldReceive('create') ->andReturn(false) @@ -67,7 +67,7 @@ public function testCannotRunIsolatedCommandIfBlocked() $this->assertSame(0, $this->command->ran); } - public function testCanRunCommandAgainAfterOtherCommandFinished() + public function testCanRunCommandAgainAfterOtherCommandFinished(): void { $this->mutex->shouldReceive('create') ->andReturn(true) @@ -82,7 +82,7 @@ public function testCanRunCommandAgainAfterOtherCommandFinished() $this->assertEquals(2, $this->command->ran); } - public function testCanRunCommandAgainNonAutomated() + public function testCanRunCommandAgainNonAutomated(): void { $this->mutex->shouldNotHaveBeenCalled(); diff --git a/tests/Commands/OperationsTest.php b/tests/Commands/OperationsTest.php index dec1e2ab..d5045488 100644 --- a/tests/Commands/OperationsTest.php +++ b/tests/Commands/OperationsTest.php @@ -16,7 +16,7 @@ class OperationsTest extends TestCase { - public function testSuccess() + public function testSuccess(): void { $this->assertDatabaseDoesntTable($this->table); @@ -32,7 +32,7 @@ public function testSuccess() $this->assertDatabaseOperationHas($this->table, 'test_migration'); } - public function testSameName() + public function testSameName(): void { $this->assertDatabaseDoesntTable($this->table); @@ -52,7 +52,7 @@ public function testSameName() $this->assertDatabaseOperationHas($this->table, 'test_migration'); } - public function testOnce() + public function testOnce(): void { $this->copyFiles(); @@ -85,7 +85,7 @@ public function testOnce() $this->assertDatabaseOperationDoesntLike($this->table, $table); } - public function testSuccessTransaction() + public function testSuccessTransaction(): void { $this->copySuccessTransaction(); @@ -103,7 +103,7 @@ public function testSuccessTransaction() $this->assertDatabaseOperationHas($this->table, $table); } - public function testFailedTransaction() + public function testFailedTransaction(): void { $this->copyFailedTransaction(); @@ -128,7 +128,7 @@ public function testFailedTransaction() $this->assertDatabaseOperationDoesntLike($this->table, $table); } - public function testSingleEnvironment() + public function testSingleEnvironment(): void { $this->copyFiles(); @@ -163,7 +163,7 @@ public function testSingleEnvironment() $this->assertDatabaseOperationDoesntLike($this->table, 'run_except_testing'); } - public function testManyEnvironments() + public function testManyEnvironments(): void { $this->copyFiles(); @@ -204,7 +204,7 @@ public function testManyEnvironments() $this->assertDatabaseOperationDoesntLike($this->table, 'run_except_many_environments'); } - public function testAllow() + public function testAllow(): void { $this->copyFiles(); @@ -230,7 +230,7 @@ public function testAllow() $this->assertDatabaseOperationDoesntLike($this->table, 'run_disallow'); } - public function testUpSuccess() + public function testUpSuccess(): void { $this->copyFiles(); @@ -248,7 +248,7 @@ public function testUpSuccess() $this->assertDatabaseOperationHas($this->table, 'run_success'); } - public function testUpSuccessOnFailed() + public function testUpSuccessOnFailed(): void { $this->copyFiles(); @@ -283,7 +283,7 @@ public function testUpSuccessOnFailed() $this->assertDatabaseOperationDoesntLike($this->table, 'run_success_on_failed'); } - public function testUpFailed() + public function testUpFailed(): void { $this->copyFiles(); @@ -301,7 +301,7 @@ public function testUpFailed() $this->assertDatabaseOperationHas($this->table, 'run_failed'); } - public function testUpFailedOnException() + public function testUpFailedOnException(): void { $this->copyFiles(); @@ -336,7 +336,7 @@ public function testUpFailedOnException() $this->assertDatabaseOperationDoesntLike($this->table, 'run_failed_failure'); } - public function testPathAsFileWithExtension() + public function testPathAsFileWithExtension(): void { $this->copyFiles(); @@ -358,7 +358,7 @@ public function testPathAsFileWithExtension() $this->assertSame('sub_path/2021_12_15_205804_baz', $this->table()->first()->operation); } - public function testPathAsFileWithoutExtension() + public function testPathAsFileWithoutExtension(): void { $this->copyFiles(); @@ -380,7 +380,7 @@ public function testPathAsFileWithoutExtension() $this->assertSame($path, $this->table()->first()->operation); } - public function testPathAsDirectory() + public function testPathAsDirectory(): void { $this->copyFiles(); @@ -402,7 +402,7 @@ public function testPathAsDirectory() $this->assertSame('sub_path/2021_12_15_205804_baz', $this->table()->first()->operation); } - public function testOperationsNotFound() + public function testOperationsNotFound(): void { $this->assertDatabaseDoesntTable($this->table); @@ -413,7 +413,7 @@ public function testOperationsNotFound() $this->artisan(Names::Status)->assertExitCode(0); } - public function testDisabledBefore() + public function testDisabledBefore(): void { $this->copyFiles(); @@ -439,7 +439,7 @@ public function testDisabledBefore() $this->assertDatabaseOperationHas($this->table, 'test_before_disabled'); } - public function testEnabledBefore() + public function testEnabledBefore(): void { $this->copyFiles(); @@ -465,7 +465,7 @@ public function testEnabledBefore() $this->assertDatabaseOperationDoesntLike($this->table, 'test_before_disabled'); } - public function testMixedBefore() + public function testMixedBefore(): void { $this->copyFiles(); @@ -563,7 +563,7 @@ public function testSorting(): void $this->assertSame($files, $records); } - public function testDirectoryExclusion() + public function testDirectoryExclusion(): void { $this->copyFiles(); @@ -613,7 +613,7 @@ public function testDirectoryExclusion() $this->assertDatabaseOperationDoesntLike($this->table, 'sub_path/2022_10_27_230732_foo'); } - public function testFileExclusion() + public function testFileExclusion(): void { $this->copyFiles(); @@ -658,7 +658,7 @@ public function testFileExclusion() $this->assertDatabaseOperationHas($this->table, 'sub_path/2022_10_27_230732_foo'); } - public function testEmptyDirectory() + public function testEmptyDirectory(): void { $this->copyEmptyDirectory(); @@ -675,7 +675,7 @@ public function testEmptyDirectory() $this->assertDatabaseCount($this->table, 0); } - public function testAsync() + public function testAsync(): void { $this->copyAsync(); @@ -711,7 +711,7 @@ public function testAsync() ])); } - public function testSync() + public function testSync(): void { $this->copyAsync(); @@ -748,7 +748,7 @@ public function testSync() $this->assertDatabaseOperationDoesntLike($this->table, 'every_time'); } - public function testViaMigrationMethod() + public function testViaMigrationMethod(): void { $this->copyViaMigrations(); diff --git a/tests/Commands/RefreshTest.php b/tests/Commands/RefreshTest.php index 5c1aef79..522c5aed 100644 --- a/tests/Commands/RefreshTest.php +++ b/tests/Commands/RefreshTest.php @@ -9,7 +9,7 @@ class RefreshTest extends TestCase { - public function testRefreshCommand() + public function testRefreshCommand(): void { $this->assertDatabaseDoesntTable($this->table); diff --git a/tests/Commands/ResetTest.php b/tests/Commands/ResetTest.php index 247a81f0..445635de 100644 --- a/tests/Commands/ResetTest.php +++ b/tests/Commands/ResetTest.php @@ -9,7 +9,7 @@ class ResetTest extends TestCase { - public function testResetCommand() + public function testResetCommand(): void { $this->assertDatabaseDoesntTable($this->table); diff --git a/tests/Commands/RollbackTest.php b/tests/Commands/RollbackTest.php index 62b6bd12..15d58fbb 100644 --- a/tests/Commands/RollbackTest.php +++ b/tests/Commands/RollbackTest.php @@ -12,7 +12,7 @@ class RollbackTest extends TestCase { - public function testRollbackCommand() + public function testRollbackCommand(): void { $this->assertDatabaseDoesntTable($this->table); @@ -54,7 +54,7 @@ public function testRollbackCommand() $this->assertDatabaseOperationHas($this->table, 'rollback_tree'); } - public function testEnvironment() + public function testEnvironment(): void { $this->copyFiles(); @@ -87,7 +87,7 @@ public function testEnvironment() $this->assertDatabaseOperationDoesntLike($this->table, 'run_on_many_environments'); } - public function testDownSuccess() + public function testDownSuccess(): void { $this->copyFiles(); @@ -110,7 +110,7 @@ public function testDownSuccess() $this->assertDatabaseOperationDoesntLike($this->table, 'run_success'); } - public function testDownSuccessOnFailed() + public function testDownSuccessOnFailed(): void { $this->copyFiles(); @@ -151,7 +151,7 @@ public function testDownSuccessOnFailed() $this->assertDatabaseOperationHas($this->table, 'run_success_on_failed'); } - public function testDownFailed() + public function testDownFailed(): void { $this->copyFiles(); @@ -174,7 +174,7 @@ public function testDownFailed() $this->assertDatabaseOperationDoesntLike($this->table, 'run_failed'); } - public function testUpFailedOnException() + public function testUpFailedOnException(): void { $this->copyFiles(); @@ -211,7 +211,7 @@ public function testUpFailedOnException() $this->assertDatabaseOperationHas($this->table, 'run_failed_failure'); } - public function testDisabledBefore() + public function testDisabledBefore(): void { $this->copyFiles(); @@ -239,7 +239,7 @@ public function testDisabledBefore() $this->assertDatabaseOperationDoesntLike($this->table, 'test_before_disabled'); } - public function testEnabledBefore() + public function testEnabledBefore(): void { $this->copyFiles(); diff --git a/tests/Commands/StatusTest.php b/tests/Commands/StatusTest.php index bf5f7d7b..800073a7 100644 --- a/tests/Commands/StatusTest.php +++ b/tests/Commands/StatusTest.php @@ -18,7 +18,7 @@ public function testNotFound(): void $this->assertDatabaseDoesntTable($this->table); } - public function testStatusCommand() + public function testStatusCommand(): void { $this->assertDatabaseDoesntTable($this->table); diff --git a/tests/Helpers/GitTest.php b/tests/Helpers/GitTest.php index fc356d7f..411f2217 100644 --- a/tests/Helpers/GitTest.php +++ b/tests/Helpers/GitTest.php @@ -9,12 +9,12 @@ class GitTest extends TestCase { - public function testCurrentBranchNull() + public function testCurrentBranchNull(): void { $this->assertNull($this->git()->currentBranch(__DIR__)); } - public function testCurrentBranch() + public function testCurrentBranch(): void { $branch = $this->git()->currentBranch(__DIR__ . '/../../'); diff --git a/tests/fixtures/app/stubs/2021_02_15_124237_test_success_transactions.stub b/tests/fixtures/app/stubs/2021_02_15_124237_test_success_transactions.stub index b4d273a0..161eaf06 100644 --- a/tests/fixtures/app/stubs/2021_02_15_124237_test_success_transactions.stub +++ b/tests/fixtures/app/stubs/2021_02_15_124237_test_success_transactions.stub @@ -14,7 +14,7 @@ return new class extends Operation { ]); } - protected function table() + protected function table(): void { return DB::table('transactions'); } diff --git a/tests/fixtures/app/stubs/2021_02_15_124852_test_failed_transactions.stub b/tests/fixtures/app/stubs/2021_02_15_124852_test_failed_transactions.stub index 995bdf08..508116d4 100644 --- a/tests/fixtures/app/stubs/2021_02_15_124852_test_failed_transactions.stub +++ b/tests/fixtures/app/stubs/2021_02_15_124852_test_failed_transactions.stub @@ -16,7 +16,7 @@ return new class extends Operation { throw new Exception('Random message'); } - protected function table() + protected function table(): void { return DB::table('transactions'); } diff --git a/tests/fixtures/migrations/2020_12_07_164624_create_test_table.php b/tests/fixtures/migrations/2020_12_07_164624_create_test_table.php index 06b5fe15..32c1941b 100644 --- a/tests/fixtures/migrations/2020_12_07_164624_create_test_table.php +++ b/tests/fixtures/migrations/2020_12_07_164624_create_test_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('test', function (Blueprint $table) { $table->uuid('value')->unique(); }); } - public function down() + public function down(): void { Schema::dropIfExists('test'); } diff --git a/tests/fixtures/migrations/2021_01_02_022431_create_every_time_table.php b/tests/fixtures/migrations/2021_01_02_022431_create_every_time_table.php index a1967fa9..0704a8ab 100644 --- a/tests/fixtures/migrations/2021_01_02_022431_create_every_time_table.php +++ b/tests/fixtures/migrations/2021_01_02_022431_create_every_time_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('every_time', function (Blueprint $table) { $table->uuid('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('every_time'); } diff --git a/tests/fixtures/migrations/2021_02_15_124419_create_transactions_table.php b/tests/fixtures/migrations/2021_02_15_124419_create_transactions_table.php index 76daf91f..fa64dd0c 100644 --- a/tests/fixtures/migrations/2021_02_15_124419_create_transactions_table.php +++ b/tests/fixtures/migrations/2021_02_15_124419_create_transactions_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('transactions', function (Blueprint $table) { $table->uuid('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('transactions'); } diff --git a/tests/fixtures/migrations/2021_05_24_122027_create_environment_table.php b/tests/fixtures/migrations/2021_05_24_122027_create_environment_table.php index 72e6102f..6b155ce2 100644 --- a/tests/fixtures/migrations/2021_05_24_122027_create_environment_table.php +++ b/tests/fixtures/migrations/2021_05_24_122027_create_environment_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('environment', function (Blueprint $table) { $table->uuid('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('environment'); } diff --git a/tests/fixtures/migrations/2021_12_23_165218_create_success_table.php b/tests/fixtures/migrations/2021_12_23_165218_create_success_table.php index cc11a1fb..eebfdb92 100644 --- a/tests/fixtures/migrations/2021_12_23_165218_create_success_table.php +++ b/tests/fixtures/migrations/2021_12_23_165218_create_success_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('success', function (Blueprint $table) { $table->string('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('success'); } diff --git a/tests/fixtures/migrations/2021_12_23_184434_create_failed_table.php b/tests/fixtures/migrations/2021_12_23_184434_create_failed_table.php index abc7e6b0..21a879f9 100644 --- a/tests/fixtures/migrations/2021_12_23_184434_create_failed_table.php +++ b/tests/fixtures/migrations/2021_12_23_184434_create_failed_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('failed', function (Blueprint $table) { $table->string('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('failed'); } diff --git a/tests/fixtures/migrations/2022_08_17_150549_create_before_table.php b/tests/fixtures/migrations/2022_08_17_150549_create_before_table.php index 67264178..9a339796 100644 --- a/tests/fixtures/migrations/2022_08_17_150549_create_before_table.php +++ b/tests/fixtures/migrations/2022_08_17_150549_create_before_table.php @@ -7,14 +7,14 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { - public function up() + public function up(): void { Schema::create('before', function (Blueprint $table) { $table->string('value'); }); } - public function down() + public function down(): void { Schema::dropIfExists('before'); }