Skip to content

Commit 04a0263

Browse files
committed
refactor: add missing type hints
1 parent f8b35a6 commit 04a0263

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/Constraints/BaseTestCase.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ abstract class BaseTestCase extends VeryBaseTestCase
2626
/**
2727
* @dataProvider getInvalidTests
2828
*
29-
* @param int-mask-of<Constraint::CHECK_MODE_*> $checkMode
29+
* @param ?int-mask-of<Constraint::CHECK_MODE_*> $checkMode
3030
*/
3131
public function testInvalidCases(string $input, string $schema, ?int $checkMode = Constraint::CHECK_MODE_NORMAL, array $errors = []): void
3232
{
@@ -57,8 +57,10 @@ public function testInvalidCases(string $input, string $schema, ?int $checkMode
5757

5858
/**
5959
* @dataProvider getInvalidForAssocTests
60+
*
61+
* @param ?int-mask-of<Constraint::CHECK_MODE_*> $checkMode
6062
*/
61-
public function testInvalidCasesUsingAssoc($input, $schema, $checkMode = Constraint::CHECK_MODE_TYPE_CAST, $errors = []): void
63+
public function testInvalidCasesUsingAssoc(string $input, string $schema, ?int $checkMode = Constraint::CHECK_MODE_TYPE_CAST, array $errors = []): void
6264
{
6365
$checkMode = $checkMode === null ? Constraint::CHECK_MODE_TYPE_CAST : $checkMode;
6466
if ($this->validateSchema) {
@@ -90,8 +92,10 @@ public function testInvalidCasesUsingAssoc($input, $schema, $checkMode = Constra
9092

9193
/**
9294
* @dataProvider getValidTests
95+
*
96+
* @param ?int-mask-of<Constraint::CHECK_MODE_*> $checkMode
9397
*/
94-
public function testValidCases($input, $schema, $checkMode = Constraint::CHECK_MODE_NORMAL): void
98+
public function testValidCases(string $input, string $schema, ?int $checkMode = Constraint::CHECK_MODE_NORMAL): void
9599
{
96100
if ($this->validateSchema) {
97101
$checkMode |= Constraint::CHECK_MODE_VALIDATE_SCHEMA;
@@ -114,8 +118,10 @@ public function testValidCases($input, $schema, $checkMode = Constraint::CHECK_M
114118

115119
/**
116120
* @dataProvider getValidForAssocTests
121+
*
122+
* @param ?int-mask-of<Constraint::CHECK_MODE_*> $checkMode
117123
*/
118-
public function testValidCasesUsingAssoc($input, $schema, $checkMode = Constraint::CHECK_MODE_TYPE_CAST): void
124+
public function testValidCasesUsingAssoc(string $input, string $schema, ?int $checkMode = Constraint::CHECK_MODE_TYPE_CAST): void
119125
{
120126
if ($this->validateSchema) {
121127
$checkMode |= Constraint::CHECK_MODE_VALIDATE_SCHEMA;

0 commit comments

Comments
 (0)