mirror of
https://github.com/Respect/Validation.git
synced 2024-06-29 10:40:24 +02:00
Use a single line to describe return type
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
c079ecbb7e
commit
b1555fb0cd
|
@ -19,9 +19,7 @@ use stdClass;
|
|||
#[CoversClass(Alnum::class)]
|
||||
final class AlnumTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Alnum, mixed}>
|
||||
*/
|
||||
/** @return iterable<array{Alnum, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
|
@ -42,9 +40,7 @@ final class AlnumTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Alnum, mixed}>
|
||||
*/
|
||||
/** @return iterable<array{Alnum, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(Alpha::class)]
|
||||
final class AlphaTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<string, array{Alpha, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<string, array{Alpha, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'alphabetic' => [new Alpha(), 'alganet'],
|
||||
|
@ -33,10 +31,8 @@ final class AlphaTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array{Alpha, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<string, array{Alpha, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'empty string' => [new Alpha(), ''],
|
||||
|
|
|
@ -31,7 +31,7 @@ final class AlwaysInvalidTest extends TestCase
|
|||
/**
|
||||
* @return mixed[][]
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[0],
|
||||
|
|
|
@ -31,7 +31,7 @@ final class AlwaysValidTest extends TestCase
|
|||
/**
|
||||
* @return mixed[][]
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[0],
|
||||
|
|
|
@ -19,10 +19,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(ArrayType::class)]
|
||||
final class ArrayTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{ArrayType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{ArrayType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new ArrayType();
|
||||
|
||||
|
@ -32,10 +30,8 @@ final class ArrayTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{ArrayType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{ArrayType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new ArrayType();
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ use stdClass;
|
|||
#[CoversClass(ArrayVal::class)]
|
||||
final class ArrayValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{ArrayVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{ArrayVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new ArrayVal();
|
||||
|
||||
|
@ -35,10 +33,8 @@ final class ArrayValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{ArrayVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{ArrayVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new ArrayVal();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use function implode;
|
|||
#[CoversClass(Base64::class)]
|
||||
final class Base64Test extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Base64, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Base64, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Base64();
|
||||
|
||||
|
@ -51,10 +49,8 @@ final class Base64Test extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Base64, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Base64, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Base64();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Base::class)]
|
||||
final class BaseTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Base, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Base, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Base(2), '011010001'],
|
||||
|
@ -35,10 +33,8 @@ final class BaseTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Base, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Base, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Base(2), ''],
|
||||
|
|
|
@ -38,10 +38,8 @@ final class BetweenTest extends RuleTestCase
|
|||
new Between(5, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Between, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Between, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Between(0, 1), 1],
|
||||
|
@ -56,10 +54,8 @@ final class BetweenTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Between, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Between, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Between(10, 20), ''],
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(BoolType::class)]
|
||||
final class BoolTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{BoolType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{BoolType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new BoolType();
|
||||
|
||||
|
@ -31,10 +29,8 @@ final class BoolTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{BoolType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{BoolType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new BoolType();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(BoolVal::class)]
|
||||
final class BoolValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{BoolVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{BoolVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new BoolVal();
|
||||
|
||||
|
@ -37,10 +35,8 @@ final class BoolValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{BoolVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{BoolVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new BoolVal();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Bsn::class)]
|
||||
final class BsnTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Bsn, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Bsn, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Bsn();
|
||||
|
||||
|
@ -38,10 +36,8 @@ final class BsnTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Bsn, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Bsn, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Bsn();
|
||||
|
||||
|
|
|
@ -90,16 +90,16 @@ final class CallTest extends RuleTestCase
|
|||
trigger_error('Forcing PHP to trigger an error');
|
||||
}
|
||||
|
||||
/** @return array<string, array{Call, mixed}> */
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<string, array{Call, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'valid rule and valid callable' => [new Call('trim', Stub::pass(1)), ' input '],
|
||||
];
|
||||
}
|
||||
|
||||
/** @return array<string, array{Call, mixed}> */
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<string, array{Call, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'PHP error' => [new Call('trim', Stub::pass(1)), []],
|
||||
|
|
|
@ -21,10 +21,8 @@ use const INF;
|
|||
#[CoversClass(CallableType::class)]
|
||||
final class CallableTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{CallableType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{CallableType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new CallableType();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class CallableTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CallableType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{CallableType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new CallableType();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(Callback::class)]
|
||||
final class CallbackTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Callback, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Callback, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Callback('is_a', 'stdClass'), new stdClass()],
|
||||
|
@ -37,10 +35,8 @@ final class CallbackTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Callback, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Callback, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[
|
||||
|
|
|
@ -30,10 +30,8 @@ final class CharsetTest extends RuleTestCase
|
|||
new Charset('UTF-8', 'UTF-9');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Charset, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Charset, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Charset('UTF-8'), ''],
|
||||
|
@ -47,10 +45,8 @@ final class CharsetTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Charset, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Charset, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Charset('ASCII');
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Cnh::class)]
|
||||
final class CnhTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Cnh, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Cnh, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Cnh();
|
||||
|
||||
|
@ -53,10 +51,8 @@ final class CnhTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Cnh, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Cnh, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Cnh();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Cnpj::class)]
|
||||
final class CnpjTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Cnpj, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Cnpj, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Cnpj();
|
||||
|
||||
|
@ -39,10 +37,8 @@ final class CnpjTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Cnpj, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Cnpj, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Cnpj();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(Consonant::class)]
|
||||
final class ConsonantTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Consonant, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Consonant, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$consonant = new Consonant();
|
||||
|
||||
|
@ -44,10 +42,8 @@ final class ConsonantTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Consonant, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Consonant, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$consonant = new Consonant();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(ContainsAny::class)]
|
||||
final class ContainsAnyTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{ContainsAny, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{ContainsAny, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new ContainsAny(['Something', 'Else']), 'something else'],
|
||||
|
@ -35,10 +33,8 @@ final class ContainsAnyTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{ContainsAny, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{ContainsAny, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new ContainsAny(['foo']), ['bar', 'baz']],
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Contains::class)]
|
||||
final class ContainsTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Contains, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Contains, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Contains('foo', false), ['bar', 'foo']],
|
||||
|
@ -38,10 +36,8 @@ final class ContainsTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Contains, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Contains, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Contains('foo', false), ''],
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(Control::class)]
|
||||
final class ControlTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Control, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Control, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new Control();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class ControlTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Control, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Control, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new Control();
|
||||
|
||||
|
|
|
@ -22,10 +22,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(Countable::class)]
|
||||
final class CountableTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Countable, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Countable, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Countable();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class CountableTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Countable, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Countable, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Countable();
|
||||
|
||||
|
|
|
@ -30,10 +30,8 @@ final class CountryCodeTest extends RuleTestCase
|
|||
new CountryCode('whatever');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CountryCode, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{CountryCode, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new CountryCode(CountryCode::ALPHA2), 'BR'],
|
||||
|
@ -48,10 +46,8 @@ final class CountryCodeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CountryCode, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{CountryCode, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new CountryCode(), 'ca'],
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Cpf::class)]
|
||||
final class CpfTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Cpf, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Cpf, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Cpf();
|
||||
|
||||
|
@ -38,10 +36,8 @@ final class CpfTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Cpf, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Cpf, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Cpf();
|
||||
|
||||
|
|
|
@ -31,10 +31,8 @@ final class CreditCardTest extends RuleTestCase
|
|||
new CreditCard('RespectCard');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CreditCard, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{CreditCard, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$general = new CreditCard();
|
||||
$amex = new CreditCard(CreditCard::AMERICAN_EXPRESS);
|
||||
|
@ -68,10 +66,8 @@ final class CreditCardTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CreditCard, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{CreditCard, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$general = new CreditCard();
|
||||
$amex = new CreditCard(CreditCard::AMERICAN_EXPRESS);
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(CurrencyCode::class)]
|
||||
final class CurrencyCodeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{CurrencyCode, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{CurrencyCode, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new CurrencyCode();
|
||||
|
||||
|
@ -33,10 +31,8 @@ final class CurrencyCodeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{CurrencyCode, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{CurrencyCode, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new CurrencyCode();
|
||||
|
||||
|
|
|
@ -42,10 +42,8 @@ final class DateTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Date, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Date, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Date(), '2017-12-31'],
|
||||
|
@ -56,10 +54,8 @@ final class DateTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Date, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Date, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Date(), 'not-a-date'],
|
||||
|
|
|
@ -57,10 +57,8 @@ final class DateTimeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{DateTime, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{DateTime, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new DateTime(), 'now'],
|
||||
|
@ -85,10 +83,8 @@ final class DateTimeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{DateTime, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{DateTime, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new DateTime(), 'not-a-date'],
|
||||
|
|
|
@ -23,10 +23,8 @@ use const NAN;
|
|||
#[CoversClass(Decimal::class)]
|
||||
final class DecimalTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Decimal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Decimal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Decimal(0), 1],
|
||||
|
@ -48,10 +46,8 @@ final class DecimalTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Decimal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Decimal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Decimal(1), '1.50'],
|
||||
|
|
|
@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Digit::class)]
|
||||
final class DigitTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Digit, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Digit, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'positive integer' => [new Digit(), 165],
|
||||
|
@ -37,10 +35,8 @@ final class DigitTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Digit, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Digit, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'empty' => [new Digit(), ''],
|
||||
|
|
|
@ -22,10 +22,8 @@ use function dir;
|
|||
#[CoversClass(Directory::class)]
|
||||
final class DirectoryTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Directory, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Directory, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Directory();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class DirectoryTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Directory, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Directory, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Directory();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(Domain::class)]
|
||||
final class DomainTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Domain, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Domain, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Domain(false), '111111111111domain.local'],
|
||||
|
@ -37,10 +35,8 @@ final class DomainTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Domain, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Domain, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Domain(), null],
|
||||
|
|
|
@ -70,10 +70,8 @@ final class EachTest extends RuleTestCase
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Each, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Each, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Each(Stub::pass(0)), []],
|
||||
|
@ -83,10 +81,8 @@ final class EachTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Each, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Each, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Each(Stub::fail(0)), 123],
|
||||
|
|
|
@ -42,10 +42,8 @@ final class EmailTest extends RuleTestCase
|
|||
self::assertTrue($sut->validate($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Email, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Email, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new Email(null);
|
||||
|
||||
|
@ -57,10 +55,8 @@ final class EmailTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Email, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Email, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new Email(null);
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(EndsWith::class)]
|
||||
final class EndsWithTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{EndsWith, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{EndsWith, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new EndsWith('foo'), ['bar', 'foo']],
|
||||
|
@ -33,10 +31,8 @@ final class EndsWithTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{EndsWith, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{EndsWith, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new EndsWith('foo'), ''],
|
||||
|
|
|
@ -29,10 +29,8 @@ final class EqualsTest extends RuleTestCase
|
|||
self::assertSame($compareTo, $exception->getParam('compareTo'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Equals, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Equals, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Equals('foo'), 'foo'],
|
||||
|
@ -43,10 +41,8 @@ final class EqualsTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Equals, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Equals, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Equals('foo'), ''],
|
||||
|
|
|
@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Equivalent::class)]
|
||||
final class EquivalentTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Equivalent, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Equivalent, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Equivalent(1), true],
|
||||
|
@ -32,10 +30,8 @@ final class EquivalentTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Equivalent, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Equivalent, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Equivalent(1), false],
|
||||
|
|
|
@ -19,10 +19,8 @@ use const INF;
|
|||
#[CoversClass(Even::class)]
|
||||
final class EvenTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Even, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Even, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Even(), 2],
|
||||
|
@ -32,10 +30,8 @@ final class EvenTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Even, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Even, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Even(), ''],
|
||||
|
|
|
@ -19,10 +19,8 @@ use SplFileObject;
|
|||
#[CoversClass(Executable::class)]
|
||||
final class ExecutableTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Executable, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Executable, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Executable();
|
||||
|
||||
|
@ -33,10 +31,8 @@ final class ExecutableTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Executable, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Executable, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Executable();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use SplFileObject;
|
|||
#[CoversClass(Exists::class)]
|
||||
final class ExistsTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Exists, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Exists, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Exists();
|
||||
|
||||
|
@ -33,10 +31,8 @@ final class ExistsTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Exists, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Exists, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Exists();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use SplFileInfo;
|
|||
#[CoversClass(Extension::class)]
|
||||
final class ExtensionTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Extension, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Extension, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'txt' => [new Extension('txt'), 'filename.txt'],
|
||||
|
@ -35,10 +33,8 @@ final class ExtensionTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Extension, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Extension, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'jpg' => [new Extension('jpg'), 'filename.txt'],
|
||||
|
|
|
@ -25,10 +25,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(Factor::class)]
|
||||
final class FactorTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Factor, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Factor, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'1 is factor 1' => [new Factor(1), 1],
|
||||
|
@ -60,10 +58,8 @@ final class FactorTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Factor, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Factor, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'3 is not factor 2' => [new Factor(3), 2],
|
||||
|
|
|
@ -22,10 +22,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(FalseVal::class)]
|
||||
final class FalseValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{FalseVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{FalseVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new FalseVal();
|
||||
|
||||
|
@ -46,10 +44,8 @@ final class FalseValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{FalseVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{FalseVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new FalseVal();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Fibonacci::class)]
|
||||
final class FibonacciTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Fibonacci, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Fibonacci, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Fibonacci();
|
||||
|
||||
|
@ -41,10 +39,8 @@ final class FibonacciTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Fibonacci, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Fibonacci, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Fibonacci();
|
||||
|
||||
|
|
|
@ -22,10 +22,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(File::class)]
|
||||
final class FileTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{File, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{File, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new File();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class FileTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{File, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{File, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new File();
|
||||
|
||||
|
|
|
@ -39,10 +39,8 @@ final class FilterVarTest extends RuleTestCase
|
|||
new FilterVar(FILTER_SANITIZE_EMAIL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{FilterVar, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{FilterVar, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new FilterVar(FILTER_VALIDATE_INT), '12345'],
|
||||
|
@ -55,10 +53,8 @@ final class FilterVarTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{FilterVar, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{FilterVar, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new FilterVar(FILTER_VALIDATE_INT), 1.4],
|
||||
|
|
|
@ -23,10 +23,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(Finite::class)]
|
||||
final class FiniteTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Finite, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Finite, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new Finite();
|
||||
|
||||
|
@ -41,10 +39,8 @@ final class FiniteTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Finite, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Finite, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new Finite();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(FloatType::class)]
|
||||
final class FloatTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{FloatType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{FloatType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new FloatType();
|
||||
|
||||
|
@ -37,10 +35,8 @@ final class FloatTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{FloatType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{FloatType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new FloatType();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(FloatVal::class)]
|
||||
final class FloatValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{FloatVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{FloatVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new FloatVal();
|
||||
|
||||
|
@ -37,10 +35,8 @@ final class FloatValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{FloatVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{FloatVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new FloatVal();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Graph::class)]
|
||||
final class GraphTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Graph, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Graph, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$graph = new Graph();
|
||||
|
||||
|
@ -40,10 +38,8 @@ final class GraphTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Graph, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Graph, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$graph = new Graph();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
|
|||
#[CoversClass(GreaterThan::class)]
|
||||
final class GreaterThanTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{GreaterThan, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{GreaterThan, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new GreaterThan(10), 11],
|
||||
|
@ -33,10 +31,8 @@ final class GreaterThanTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{GreaterThan, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{GreaterThan, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new GreaterThan(10), 9],
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(HexRgbColor::class)]
|
||||
final class HexRgbColorTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{HexRgbColor, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{HexRgbColor, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new HexRgbColor();
|
||||
|
||||
|
@ -40,10 +38,8 @@ final class HexRgbColorTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{HexRgbColor, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{HexRgbColor, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new HexRgbColor();
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ use function extension_loaded;
|
|||
#[CoversClass(Iban::class)]
|
||||
final class IbanTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Iban, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Iban, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new Iban();
|
||||
|
||||
|
@ -42,10 +40,8 @@ final class IbanTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Iban, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Iban, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new Iban();
|
||||
|
||||
|
|
|
@ -29,10 +29,8 @@ final class IdenticalTest extends RuleTestCase
|
|||
self::assertSame($compareTo, $exception->getParam('compareTo'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Identical, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Identical, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$object = new stdClass();
|
||||
|
||||
|
@ -45,10 +43,8 @@ final class IdenticalTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Identical, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Identical, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Identical(42), '42'],
|
||||
|
|
|
@ -38,10 +38,8 @@ final class ImageTest extends RuleTestCase
|
|||
self::assertTrue($rule->validate($input));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Image, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Image, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Image();
|
||||
|
||||
|
@ -55,10 +53,8 @@ final class ImageTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Image, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Image, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Image();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Imei::class)]
|
||||
final class ImeiTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Imei, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Imei, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Imei();
|
||||
|
||||
|
@ -37,10 +35,8 @@ final class ImeiTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Imei, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Imei, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Imei();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(In::class)]
|
||||
final class InTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{In, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{In, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new In(''), ''],
|
||||
|
@ -36,10 +34,8 @@ final class InTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{In, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{In, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new In('0'), null],
|
||||
|
|
|
@ -21,10 +21,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(Infinite::class)]
|
||||
final class InfiniteTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Infinite, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Infinite, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Infinite();
|
||||
|
||||
|
@ -34,10 +32,8 @@ final class InfiniteTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Infinite, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Infinite, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Infinite();
|
||||
|
||||
|
|
|
@ -23,10 +23,8 @@ use Traversable;
|
|||
#[CoversClass(Instance::class)]
|
||||
final class InstanceTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Instance, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Instance, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Instance(DateTime::class), new DateTime()],
|
||||
|
@ -35,10 +33,8 @@ final class InstanceTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Instance, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Instance, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Instance(DateTime::class), ''],
|
||||
|
|
|
@ -19,10 +19,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(IntType::class)]
|
||||
final class IntTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{IntType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{IntType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new IntType();
|
||||
|
||||
|
@ -34,10 +32,8 @@ final class IntTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{IntType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{IntType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new IntType();
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(IntVal::class)]
|
||||
final class IntValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{IntVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{IntVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new IntVal();
|
||||
|
||||
|
@ -45,10 +43,8 @@ final class IntValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{IntVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{IntVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new IntVal();
|
||||
|
||||
|
|
|
@ -50,10 +50,8 @@ final class IpTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Ip, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Ip, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Ip('127.*'), '127.0.0.1'],
|
||||
|
@ -78,10 +76,8 @@ final class IpTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Ip, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Ip, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Ip('127.*'), '192.0.1.0'],
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Isbn::class)]
|
||||
final class IsbnTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Isbn, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Isbn, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new Isbn();
|
||||
|
||||
|
@ -35,10 +33,8 @@ final class IsbnTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Isbn, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Isbn, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new Isbn();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(IterableType::class)]
|
||||
final class IterableTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{IterableType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{IterableType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new IterableType();
|
||||
|
||||
|
@ -33,10 +31,8 @@ final class IterableTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{IterableType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{IterableType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new IterableType();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Json::class)]
|
||||
final class JsonTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Json, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Json, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$json = new Json();
|
||||
|
||||
|
@ -38,10 +36,8 @@ final class JsonTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Json, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Json, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$json = new Json();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(KeyValue::class)]
|
||||
final class KeyValueTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<string, array{KeyValue, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<string, array{KeyValue, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'Equal values' => [new KeyValue('foo', 'equals', 'bar'), ['foo' => 42, 'bar' => 42]],
|
||||
|
@ -35,10 +33,8 @@ final class KeyValueTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array{KeyValue, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<string, array{KeyValue, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$keyValue = new KeyValue('foo', 'equals', 'bar');
|
||||
|
||||
|
|
|
@ -28,10 +28,8 @@ final class LanguageCodeTest extends RuleTestCase
|
|||
new LanguageCode('foo');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{LanguageCode, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{LanguageCode, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2);
|
||||
$sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3);
|
||||
|
@ -48,10 +46,8 @@ final class LanguageCodeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{LanguageCode, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{LanguageCode, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2);
|
||||
$sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3);
|
||||
|
|
|
@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(LeapDate::class)]
|
||||
final class LeapDateTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{LeapDate, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{LeapDate, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new LeapDate('Y-m-d'), '1988-02-29'],
|
||||
|
@ -31,10 +29,8 @@ final class LeapDateTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{LeapDate, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{LeapDate, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new LeapDate('Y-m-d'), '1989-02-29'],
|
||||
|
|
|
@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(LeapYear::class)]
|
||||
final class LeapYearTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{LeapYear, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{LeapYear, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new LeapYear();
|
||||
|
||||
|
@ -34,10 +32,8 @@ final class LeapYearTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{LeapYear, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{LeapYear, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new LeapYear();
|
||||
|
||||
|
|
|
@ -32,10 +32,8 @@ final class LengthTest extends RuleTestCase
|
|||
new Length(10, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Length, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Length, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Length(1, 15), 'alganet'],
|
||||
|
@ -55,10 +53,8 @@ final class LengthTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Length, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Length, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Length(1, 15), ''],
|
||||
|
|
|
@ -19,10 +19,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
|
|||
#[CoversClass(LessThan::class)]
|
||||
final class LessThanTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{LessThan, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{LessThan, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new LessThan(10), 9],
|
||||
|
@ -33,10 +31,8 @@ final class LessThanTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{LessThan, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{LessThan, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new LessThan(10), 10],
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Lowercase::class)]
|
||||
final class LowercaseTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Lowercase, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Lowercase, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Lowercase();
|
||||
|
||||
|
@ -39,10 +37,8 @@ final class LowercaseTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Lowercase, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Lowercase, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Lowercase();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Luhn::class)]
|
||||
final class LuhnTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Luhn, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Luhn, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Luhn();
|
||||
|
||||
|
@ -32,10 +30,8 @@ final class LuhnTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Luhn, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Luhn, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Luhn();
|
||||
|
||||
|
|
|
@ -22,10 +22,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(MacAddress::class)]
|
||||
final class MacAddressTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{MacAddress, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{MacAddress, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new MacAddress();
|
||||
|
||||
|
@ -37,10 +35,8 @@ final class MacAddressTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{MacAddress, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{MacAddress, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new MacAddress();
|
||||
|
||||
|
|
|
@ -24,10 +24,8 @@ use function strtotime;
|
|||
#[CoversClass(MaxAge::class)]
|
||||
final class MaxAgeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{MaxAge, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{MaxAge, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new MaxAge(30, 'Y-m-d'), date('Y-m-d', strtotime('30 years ago'))],
|
||||
|
@ -37,10 +35,8 @@ final class MaxAgeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{MaxAge, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{MaxAge, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new MaxAge(30), new DateTime('30 years ago')],
|
||||
|
|
|
@ -21,10 +21,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
|
|||
#[CoversClass(Max::class)]
|
||||
final class MaxTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Max, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Max, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Max(10), 9],
|
||||
|
@ -37,10 +35,8 @@ final class MaxTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Max, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Max, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Max(10), 11],
|
||||
|
|
|
@ -49,10 +49,8 @@ final class MimetypeTest extends RuleTestCase
|
|||
self::assertTrue($rule->validate($filename));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Mimetype, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Mimetype, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'image/png' => [new Mimetype('image/png'), 'tests/fixtures/valid-image.png'],
|
||||
|
@ -64,10 +62,8 @@ final class MimetypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Mimetype, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Mimetype, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
'invalid file' => [new Mimetype('image/png'), 'tests/fixtures/invalid-image.png'],
|
||||
|
|
|
@ -24,10 +24,8 @@ use function strtotime;
|
|||
#[CoversClass(MinAge::class)]
|
||||
final class MinAgeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{MinAge, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{MinAge, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new MinAge(18, 'Y-m-d'), date('Y-m-d', strtotime('18 years ago'))],
|
||||
|
@ -37,10 +35,8 @@ final class MinAgeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{MinAge, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{MinAge, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new MinAge(18), new DateTime('18 years ago')],
|
||||
|
|
|
@ -21,10 +21,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
|
|||
#[CoversClass(Min::class)]
|
||||
final class MinTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Min, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Min, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
// From documentation
|
||||
|
@ -52,10 +50,8 @@ final class MinTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Min, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Min, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
// From documentation
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Multiple::class)]
|
||||
final class MultipleTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Multiple, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Multiple, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Multiple(5), 20],
|
||||
|
@ -35,10 +33,8 @@ final class MultipleTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Multiple, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Multiple, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Multiple(5), 11],
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Negative::class)]
|
||||
final class NegativeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Negative, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Negative, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Negative();
|
||||
|
||||
|
@ -32,10 +30,8 @@ final class NegativeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Negative, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Negative, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Negative();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(NfeAccessKey::class)]
|
||||
final class NfeAccessKeyTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NfeAccessKey, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NfeAccessKey, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$nfe = new NfeAccessKey();
|
||||
|
||||
|
@ -29,10 +27,8 @@ final class NfeAccessKeyTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NfeAccessKey, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NfeAccessKey, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$nfe = new NfeAccessKey();
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ use function stream_context_create;
|
|||
#[CoversClass(Nif::class)]
|
||||
final class NifTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Nif, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Nif, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Nif();
|
||||
|
||||
|
@ -52,10 +50,8 @@ final class NifTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Nif, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Nif, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Nif();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(Nip::class)]
|
||||
final class NipTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Nip, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Nip, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Nip();
|
||||
|
||||
|
@ -32,10 +30,8 @@ final class NipTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Nip, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Nip, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Nip();
|
||||
|
||||
|
|
|
@ -76,10 +76,8 @@ final class NoTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{No, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{No, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new No();
|
||||
|
||||
|
@ -93,10 +91,8 @@ final class NoTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{No, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{No, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new No();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(NoWhitespace::class)]
|
||||
final class NoWhitespaceTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NoWhitespace, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NoWhitespace, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new NoWhitespace();
|
||||
|
||||
|
@ -33,10 +31,8 @@ final class NoWhitespaceTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NoWhitespace, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NoWhitespace, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new NoWhitespace();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(NotBlank::class)]
|
||||
final class NotBlankTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NotBlank, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NotBlank, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$object = new stdClass();
|
||||
$object->foo = true;
|
||||
|
@ -37,10 +35,8 @@ final class NotBlankTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NotBlank, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NotBlank, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new NotBlank();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(NotEmoji::class)]
|
||||
final class NotEmojiTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NotEmoji, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NotEmoji, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$sut = new NotEmoji();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class NotEmojiTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NotEmoji, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NotEmoji, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$sut = new NotEmoji();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(NotEmpty::class)]
|
||||
final class NotEmptyTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NotEmpty, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NotEmpty, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new NotEmpty();
|
||||
|
||||
|
@ -34,10 +32,8 @@ final class NotEmptyTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NotEmpty, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NotEmpty, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new NotEmpty();
|
||||
|
||||
|
|
|
@ -18,10 +18,8 @@ use stdClass;
|
|||
#[CoversClass(NotOptional::class)]
|
||||
final class NotOptionalTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NotOptional, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NotOptional, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new NotOptional();
|
||||
|
||||
|
@ -43,10 +41,8 @@ final class NotOptionalTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NotOptional, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NotOptional, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new NotOptional();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(NullType::class)]
|
||||
final class NullTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NullType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NullType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new NullType();
|
||||
|
||||
|
@ -29,10 +27,8 @@ final class NullTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NullType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NullType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new NullType();
|
||||
|
||||
|
|
|
@ -25,10 +25,8 @@ use const PHP_INT_MAX;
|
|||
#[CoversClass(Number::class)]
|
||||
final class NumberTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Number, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Number, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Number();
|
||||
|
||||
|
@ -44,10 +42,8 @@ final class NumberTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Number, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Number, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Number();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(NumericVal::class)]
|
||||
final class NumericValTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{NumericVal, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{NumericVal, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$numericVal = new NumericVal();
|
||||
|
||||
|
@ -34,10 +32,8 @@ final class NumericValTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{NumericVal, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{NumericVal, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$numericVal = new NumericVal();
|
||||
|
||||
|
|
|
@ -19,10 +19,8 @@ use stdClass;
|
|||
#[CoversClass(ObjectType::class)]
|
||||
final class ObjectTypeTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{ObjectType, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{ObjectType, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new ObjectType();
|
||||
|
||||
|
@ -32,10 +30,8 @@ final class ObjectTypeTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{ObjectType, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{ObjectType, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new ObjectType();
|
||||
|
||||
|
|
|
@ -20,10 +20,8 @@ use function tmpfile;
|
|||
#[CoversClass(Odd::class)]
|
||||
final class OddTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Odd, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Odd, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Odd();
|
||||
|
||||
|
@ -35,10 +33,8 @@ final class OddTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Odd, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Odd, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Odd();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(PerfectSquare::class)]
|
||||
final class PerfectSquareTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{PerfectSquare, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{PerfectSquare, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new PerfectSquare();
|
||||
|
||||
|
@ -38,10 +36,8 @@ final class PerfectSquareTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{PerfectSquare, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{PerfectSquare, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new PerfectSquare();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
|
|||
#[CoversClass(Pesel::class)]
|
||||
final class PeselTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{Pesel, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Pesel, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new Pesel();
|
||||
|
||||
|
@ -36,10 +34,8 @@ final class PeselTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Pesel, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Pesel, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new Pesel();
|
||||
|
||||
|
|
|
@ -38,10 +38,8 @@ final class PhoneTest extends RuleTestCase
|
|||
$phoneValidator->assert('abc');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Phone, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{Phone, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Phone(), '+1 650 253 00 00'],
|
||||
|
@ -55,10 +53,8 @@ final class PhoneTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{Phone, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{Phone, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
return [
|
||||
[new Phone(), '+1-650-253-00-0'],
|
||||
|
|
|
@ -24,10 +24,8 @@ use function uniqid;
|
|||
#[CoversClass(PhpLabel::class)]
|
||||
final class PhpLabelTest extends RuleTestCase
|
||||
{
|
||||
/**
|
||||
* @return array<array{PhpLabel, mixed}>
|
||||
*/
|
||||
public static function providerForValidInput(): array
|
||||
/** @return iterable<array{PhpLabel, mixed}> */
|
||||
public static function providerForValidInput(): iterable
|
||||
{
|
||||
$rule = new PhpLabel();
|
||||
|
||||
|
@ -42,10 +40,8 @@ final class PhpLabelTest extends RuleTestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<array{PhpLabel, mixed}>
|
||||
*/
|
||||
public static function providerForInvalidInput(): array
|
||||
/** @return iterable<array{PhpLabel, mixed}> */
|
||||
public static function providerForInvalidInput(): iterable
|
||||
{
|
||||
$rule = new PhpLabel();
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue