MDL-81522 phpunit: Add missing void return type to all tests #2

This commit includes more changes, all them also adding the :void
return type to unit tests missing them.

The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.

All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
This commit is contained in:
Eloy Lafuente (stronk7)
2024-06-11 12:18:05 +02:00
parent 1093256560
commit 091b458c52
72 changed files with 153 additions and 153 deletions
+1 -1
View File
@@ -771,7 +771,7 @@ class phpunit_dataset_test extends advanced_testcase {
* @dataProvider to_database_provider
* @covers ::to_database
*/
public function test_to_database(array $files, ?array $filter, ?string $exception, array $columns, array $rows) {
public function test_to_database(array $files, ?array $filter, ?string $exception, array $columns, array $rows): void {
global $DB;
$this->resetAfterTest();