Skip to content

Commit 1ce507e

Browse files
authored
Merge pull request #7748 from paulbalandan/tests-void-return
Add void return to tests
2 parents fbdcee4 + 361cb3f commit 1ce507e

File tree

275 files changed

+3769
-3769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+3769
-3769
lines changed

tests/_support/Commands/AppInfo.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ class AppInfo extends BaseCommand
2323
protected $arguments = ['draft' => 'unused'];
2424
protected $description = 'Displays basic application information.';
2525

26-
public function run(array $params)
26+
public function run(array $params): void
2727
{
2828
CLI::write('CI Version: ' . CLI::color(CodeIgniter::CI_VERSION, 'red'));
2929
}
3030

31-
public function bomb()
31+
public function bomb(): void
3232
{
3333
try {
3434
CLI::color('test', 'white', 'Background');
@@ -37,7 +37,7 @@ public function bomb()
3737
}
3838
}
3939

40-
public function helpme()
40+
public function helpme(): void
4141
{
4242
$this->call('help');
4343
}

tests/_support/Commands/InvalidCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct()
2727
throw new ReflectionException();
2828
}
2929

30-
public function run(array $params)
30+
public function run(array $params): void
3131
{
3232
CLI::write('CI Version: ' . CLI::color(CodeIgniter::CI_VERSION, 'red'));
3333
}

tests/_support/Commands/LanguageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LanguageCommand extends BaseCommand
2727
'--sort' => 'Turn on/off the sortImports flag.',
2828
];
2929

30-
public function run(array $params)
30+
public function run(array $params): void
3131
{
3232
$this->setHasClassName(false);
3333
$params[0] = 'Foobar';

tests/_support/Commands/ParamsReveal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ParamsReveal extends BaseCommand
2121
protected $description = 'Reveal params';
2222
public static $args;
2323

24-
public function run(array $params)
24+
public function run(array $params): void
2525
{
2626
static::$args = $params;
2727
}

tests/_support/Commands/Unsuffixable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Unsuffixable extends BaseCommand
6565
/**
6666
* Actually execute a command.
6767
*/
68-
public function run(array $params)
68+
public function run(array $params): void
6969
{
7070
$this->component = 'Command';
7171
$this->directory = 'Commands';

tests/_support/Controllers/Popcorn.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function pop()
3333
return $this->respond('Oops', 567, 'Surprise');
3434
}
3535

36-
public function popper()
36+
public function popper(): void
3737
{
3838
throw new RuntimeException('Surprise', 500);
3939
}
@@ -61,12 +61,12 @@ public function index3()
6161
return $this->response->setJSON(['lang' => $this->request->getLocale()]);
6262
}
6363

64-
public function canyon()
64+
public function canyon(): void
6565
{
6666
echo 'Hello-o-o ' . $this->request->getGet('foo');
6767
}
6868

69-
public function cat()
69+
public function cat(): void
7070
{
7171
}
7272

tests/_support/Database/Migrations/20160428212500_Create_test_tables.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Migration_Create_test_tables extends Migration
1717
{
18-
public function up()
18+
public function up(): void
1919
{
2020
// User Table
2121
$this->forge->addField([
@@ -160,7 +160,7 @@ public function up()
160160
}
161161
}
162162

163-
public function down()
163+
public function down(): void
164164
{
165165
$this->forge->dropTable('user', true);
166166
$this->forge->dropTable('job', true);

tests/_support/Database/Seeds/AnotherSeeder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class AnotherSeeder extends Seeder
1717
{
18-
public function run()
18+
public function run(): void
1919
{
2020
$row = [
2121
'name' => 'Jerome Lohan',

tests/_support/Database/Seeds/CITestSeeder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class CITestSeeder extends Seeder
1717
{
18-
public function run()
18+
public function run(): void
1919
{
2020
// Job Data
2121
$data = [

tests/_support/Filters/Customfilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function before(RequestInterface $request, $arguments = null)
2323
return $request;
2424
}
2525

26-
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
26+
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null): void
2727
{
2828
}
2929
}

0 commit comments

Comments
 (0)