Skip to content

Commit

Permalink
fix: PHPStan errors appear
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevsr committed Oct 11, 2024
1 parent e7ed5e4 commit 9d754ae
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/system/Validation/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use CodeIgniter\Validation\Exceptions\ValidationException;
use Config\App;
use Config\Services;
use Generator;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\ExpectationFailedException;
Expand Down Expand Up @@ -1828,18 +1829,26 @@ public function testRuleWithAsteriskToMultiDimensionalArray(): void
}

/**
* @param array<string, mixed> $data
* @param array<string, string> $rules
* @param array<string, mixed> $expectedData
*
* @see https://github.com/codeigniter4/CodeIgniter4/issues/9219
*/
#[DataProvider('provideMultipleAsterisk')]
public function testRuleWithMultipleAsterisk(array $data = [], array $rules = [], bool $expectedCheck = false, array $expectedData = []): void
{
public function testRuleWithMultipleAsterisk(
array $data = [],
array $rules = [],
bool $expectedCheck = false,
array $expectedData = []
): void {
$this->validation->setRules($rules);

$this->assertSame($expectedCheck, $this->validation->run($data));
$this->assertSame($expectedData, $this->validation->getValidated());
}

public static function provideMultipleAsterisk(): iterable
public static function provideMultipleAsterisk(): Generator
{
yield 'success' => [
[
Expand Down

0 comments on commit 9d754ae

Please sign in to comment.