Use a single line to describe return type

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2024-02-04 19:23:04 +01:00
parent c079ecbb7e
commit b1555fb0cd
No known key found for this signature in database
GPG key ID: 221E9281655813A6
140 changed files with 552 additions and 1096 deletions

View file

@ -19,9 +19,7 @@ use stdClass;
#[CoversClass(Alnum::class)] #[CoversClass(Alnum::class)]
final class AlnumTest extends RuleTestCase final class AlnumTest extends RuleTestCase
{ {
/** /** @return iterable<array{Alnum, mixed}> */
* @return array<array{Alnum, mixed}>
*/
public static function providerForValidInput(): iterable public static function providerForValidInput(): iterable
{ {
return [ return [
@ -42,9 +40,7 @@ final class AlnumTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Alnum, mixed}> */
* @return array<array{Alnum, mixed}>
*/
public static function providerForInvalidInput(): iterable public static function providerForInvalidInput(): iterable
{ {
return [ return [

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(Alpha::class)] #[CoversClass(Alpha::class)]
final class AlphaTest extends RuleTestCase final class AlphaTest extends RuleTestCase
{ {
/** /** @return iterable<string, array{Alpha, mixed}> */
* @return array<string, array{Alpha, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'alphabetic' => [new Alpha(), 'alganet'], 'alphabetic' => [new Alpha(), 'alganet'],
@ -33,10 +31,8 @@ final class AlphaTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<string, array{Alpha, mixed}> */
* @return array<string, array{Alpha, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
'empty string' => [new Alpha(), ''], 'empty string' => [new Alpha(), ''],

View file

@ -31,7 +31,7 @@ final class AlwaysInvalidTest extends TestCase
/** /**
* @return mixed[][] * @return mixed[][]
*/ */
public static function providerForInvalidInput(): array public static function providerForInvalidInput(): iterable
{ {
return [ return [
[0], [0],

View file

@ -31,7 +31,7 @@ final class AlwaysValidTest extends TestCase
/** /**
* @return mixed[][] * @return mixed[][]
*/ */
public static function providerForValidInput(): array public static function providerForValidInput(): iterable
{ {
return [ return [
[0], [0],

View file

@ -19,10 +19,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(ArrayType::class)] #[CoversClass(ArrayType::class)]
final class ArrayTypeTest extends RuleTestCase final class ArrayTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{ArrayType, mixed}> */
* @return array<array{ArrayType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new ArrayType(); $rule = new ArrayType();
@ -32,10 +30,8 @@ final class ArrayTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{ArrayType, mixed}> */
* @return array<array{ArrayType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new ArrayType(); $rule = new ArrayType();

View file

@ -20,10 +20,8 @@ use stdClass;
#[CoversClass(ArrayVal::class)] #[CoversClass(ArrayVal::class)]
final class ArrayValTest extends RuleTestCase final class ArrayValTest extends RuleTestCase
{ {
/** /** @return iterable<array{ArrayVal, mixed}> */
* @return array<array{ArrayVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new ArrayVal(); $rule = new ArrayVal();
@ -35,10 +33,8 @@ final class ArrayValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{ArrayVal, mixed}> */
* @return array<array{ArrayVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new ArrayVal(); $rule = new ArrayVal();

View file

@ -19,10 +19,8 @@ use function implode;
#[CoversClass(Base64::class)] #[CoversClass(Base64::class)]
final class Base64Test extends RuleTestCase final class Base64Test extends RuleTestCase
{ {
/** /** @return iterable<array{Base64, mixed}> */
* @return array<array{Base64, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Base64(); $rule = new Base64();
@ -51,10 +49,8 @@ final class Base64Test extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Base64, mixed}> */
* @return array<array{Base64, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Base64(); $rule = new Base64();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Base::class)] #[CoversClass(Base::class)]
final class BaseTest extends RuleTestCase final class BaseTest extends RuleTestCase
{ {
/** /** @return iterable<array{Base, mixed}> */
* @return array<array{Base, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Base(2), '011010001'], [new Base(2), '011010001'],
@ -35,10 +33,8 @@ final class BaseTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Base, mixed}> */
* @return array<array{Base, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Base(2), ''], [new Base(2), ''],

View file

@ -38,10 +38,8 @@ final class BetweenTest extends RuleTestCase
new Between(5, 5); new Between(5, 5);
} }
/** /** @return iterable<array{Between, mixed}> */
* @return array<array{Between, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Between(0, 1), 1], [new Between(0, 1), 1],
@ -56,10 +54,8 @@ final class BetweenTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Between, mixed}> */
* @return array<array{Between, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Between(10, 20), ''], [new Between(10, 20), ''],

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(BoolType::class)] #[CoversClass(BoolType::class)]
final class BoolTypeTest extends RuleTestCase final class BoolTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{BoolType, mixed}> */
* @return array<array{BoolType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new BoolType(); $rule = new BoolType();
@ -31,10 +29,8 @@ final class BoolTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{BoolType, mixed}> */
* @return array<array{BoolType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new BoolType(); $rule = new BoolType();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(BoolVal::class)] #[CoversClass(BoolVal::class)]
final class BoolValTest extends RuleTestCase final class BoolValTest extends RuleTestCase
{ {
/** /** @return iterable<array{BoolVal, mixed}> */
* @return array<array{BoolVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new BoolVal(); $rule = new BoolVal();
@ -37,10 +35,8 @@ final class BoolValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{BoolVal, mixed}> */
* @return array<array{BoolVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new BoolVal(); $rule = new BoolVal();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Bsn::class)] #[CoversClass(Bsn::class)]
final class BsnTest extends RuleTestCase final class BsnTest extends RuleTestCase
{ {
/** /** @return iterable<array{Bsn, mixed}> */
* @return array<array{Bsn, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Bsn(); $rule = new Bsn();
@ -38,10 +36,8 @@ final class BsnTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Bsn, mixed}> */
* @return array<array{Bsn, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Bsn(); $rule = new Bsn();

View file

@ -90,16 +90,16 @@ final class CallTest extends RuleTestCase
trigger_error('Forcing PHP to trigger an error'); trigger_error('Forcing PHP to trigger an error');
} }
/** @return array<string, array{Call, mixed}> */ /** @return iterable<string, array{Call, mixed}> */
public static function providerForValidInput(): array public static function providerForValidInput(): iterable
{ {
return [ return [
'valid rule and valid callable' => [new Call('trim', Stub::pass(1)), ' input '], 'valid rule and valid callable' => [new Call('trim', Stub::pass(1)), ' input '],
]; ];
} }
/** @return array<string, array{Call, mixed}> */ /** @return iterable<string, array{Call, mixed}> */
public static function providerForInvalidInput(): array public static function providerForInvalidInput(): iterable
{ {
return [ return [
'PHP error' => [new Call('trim', Stub::pass(1)), []], 'PHP error' => [new Call('trim', Stub::pass(1)), []],

View file

@ -21,10 +21,8 @@ use const INF;
#[CoversClass(CallableType::class)] #[CoversClass(CallableType::class)]
final class CallableTypeTest extends RuleTestCase final class CallableTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{CallableType, mixed}> */
* @return array<array{CallableType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new CallableType(); $rule = new CallableType();
@ -36,10 +34,8 @@ final class CallableTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{CallableType, mixed}> */
* @return array<array{CallableType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new CallableType(); $rule = new CallableType();

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(Callback::class)] #[CoversClass(Callback::class)]
final class CallbackTest extends RuleTestCase final class CallbackTest extends RuleTestCase
{ {
/** /** @return iterable<array{Callback, mixed}> */
* @return array<array{Callback, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Callback('is_a', 'stdClass'), new stdClass()], [new Callback('is_a', 'stdClass'), new stdClass()],
@ -37,10 +35,8 @@ final class CallbackTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Callback, mixed}> */
* @return array<array{Callback, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[ [

View file

@ -30,10 +30,8 @@ final class CharsetTest extends RuleTestCase
new Charset('UTF-8', 'UTF-9'); new Charset('UTF-8', 'UTF-9');
} }
/** /** @return iterable<array{Charset, mixed}> */
* @return array<array{Charset, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Charset('UTF-8'), ''], [new Charset('UTF-8'), ''],
@ -47,10 +45,8 @@ final class CharsetTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Charset, mixed}> */
* @return array<array{Charset, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Charset('ASCII'); $rule = new Charset('ASCII');

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Cnh::class)] #[CoversClass(Cnh::class)]
final class CnhTest extends RuleTestCase final class CnhTest extends RuleTestCase
{ {
/** /** @return iterable<array{Cnh, mixed}> */
* @return array<array{Cnh, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Cnh(); $rule = new Cnh();
@ -53,10 +51,8 @@ final class CnhTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Cnh, mixed}> */
* @return array<array{Cnh, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Cnh(); $rule = new Cnh();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Cnpj::class)] #[CoversClass(Cnpj::class)]
final class CnpjTest extends RuleTestCase final class CnpjTest extends RuleTestCase
{ {
/** /** @return iterable<array{Cnpj, mixed}> */
* @return array<array{Cnpj, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Cnpj(); $rule = new Cnpj();
@ -39,10 +37,8 @@ final class CnpjTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Cnpj, mixed}> */
* @return array<array{Cnpj, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Cnpj(); $rule = new Cnpj();

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(Consonant::class)] #[CoversClass(Consonant::class)]
final class ConsonantTest extends RuleTestCase final class ConsonantTest extends RuleTestCase
{ {
/** /** @return iterable<array{Consonant, mixed}> */
* @return array<array{Consonant, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$consonant = new Consonant(); $consonant = new Consonant();
@ -44,10 +42,8 @@ final class ConsonantTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Consonant, mixed}> */
* @return array<array{Consonant, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$consonant = new Consonant(); $consonant = new Consonant();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(ContainsAny::class)] #[CoversClass(ContainsAny::class)]
final class ContainsAnyTest extends RuleTestCase final class ContainsAnyTest extends RuleTestCase
{ {
/** /** @return iterable<array{ContainsAny, mixed}> */
* @return array<array{ContainsAny, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new ContainsAny(['Something', 'Else']), 'something else'], [new ContainsAny(['Something', 'Else']), 'something else'],
@ -35,10 +33,8 @@ final class ContainsAnyTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{ContainsAny, mixed}> */
* @return array<array{ContainsAny, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new ContainsAny(['foo']), ['bar', 'baz']], [new ContainsAny(['foo']), ['bar', 'baz']],

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Contains::class)] #[CoversClass(Contains::class)]
final class ContainsTest extends RuleTestCase final class ContainsTest extends RuleTestCase
{ {
/** /** @return iterable<array{Contains, mixed}> */
* @return array<array{Contains, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Contains('foo', false), ['bar', 'foo']], [new Contains('foo', false), ['bar', 'foo']],
@ -38,10 +36,8 @@ final class ContainsTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Contains, mixed}> */
* @return array<array{Contains, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Contains('foo', false), ''], [new Contains('foo', false), ''],

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(Control::class)] #[CoversClass(Control::class)]
final class ControlTest extends RuleTestCase final class ControlTest extends RuleTestCase
{ {
/** /** @return iterable<array{Control, mixed}> */
* @return array<array{Control, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new Control(); $sut = new Control();
@ -36,10 +34,8 @@ final class ControlTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Control, mixed}> */
* @return array<array{Control, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new Control(); $sut = new Control();

View file

@ -22,10 +22,8 @@ use const PHP_INT_MAX;
#[CoversClass(Countable::class)] #[CoversClass(Countable::class)]
final class CountableTest extends RuleTestCase final class CountableTest extends RuleTestCase
{ {
/** /** @return iterable<array{Countable, mixed}> */
* @return array<array{Countable, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Countable(); $rule = new Countable();
@ -36,10 +34,8 @@ final class CountableTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Countable, mixed}> */
* @return array<array{Countable, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Countable(); $rule = new Countable();

View file

@ -30,10 +30,8 @@ final class CountryCodeTest extends RuleTestCase
new CountryCode('whatever'); new CountryCode('whatever');
} }
/** /** @return iterable<array{CountryCode, mixed}> */
* @return array<array{CountryCode, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new CountryCode(CountryCode::ALPHA2), 'BR'], [new CountryCode(CountryCode::ALPHA2), 'BR'],
@ -48,10 +46,8 @@ final class CountryCodeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{CountryCode, mixed}> */
* @return array<array{CountryCode, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new CountryCode(), 'ca'], [new CountryCode(), 'ca'],

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Cpf::class)] #[CoversClass(Cpf::class)]
final class CpfTest extends RuleTestCase final class CpfTest extends RuleTestCase
{ {
/** /** @return iterable<array{Cpf, mixed}> */
* @return array<array{Cpf, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Cpf(); $rule = new Cpf();
@ -38,10 +36,8 @@ final class CpfTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Cpf, mixed}> */
* @return array<array{Cpf, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Cpf(); $rule = new Cpf();

View file

@ -31,10 +31,8 @@ final class CreditCardTest extends RuleTestCase
new CreditCard('RespectCard'); new CreditCard('RespectCard');
} }
/** /** @return iterable<array{CreditCard, mixed}> */
* @return array<array{CreditCard, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$general = new CreditCard(); $general = new CreditCard();
$amex = new CreditCard(CreditCard::AMERICAN_EXPRESS); $amex = new CreditCard(CreditCard::AMERICAN_EXPRESS);
@ -68,10 +66,8 @@ final class CreditCardTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{CreditCard, mixed}> */
* @return array<array{CreditCard, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$general = new CreditCard(); $general = new CreditCard();
$amex = new CreditCard(CreditCard::AMERICAN_EXPRESS); $amex = new CreditCard(CreditCard::AMERICAN_EXPRESS);

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(CurrencyCode::class)] #[CoversClass(CurrencyCode::class)]
final class CurrencyCodeTest extends RuleTestCase final class CurrencyCodeTest extends RuleTestCase
{ {
/** /** @return iterable<array{CurrencyCode, mixed}> */
* @return array<array{CurrencyCode, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new CurrencyCode(); $rule = new CurrencyCode();
@ -33,10 +31,8 @@ final class CurrencyCodeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{CurrencyCode, mixed}> */
* @return array<array{CurrencyCode, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new CurrencyCode(); $rule = new CurrencyCode();

View file

@ -42,10 +42,8 @@ final class DateTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Date, mixed}> */
* @return array<array{Date, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Date(), '2017-12-31'], [new Date(), '2017-12-31'],
@ -56,10 +54,8 @@ final class DateTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Date, mixed}> */
* @return array<array{Date, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Date(), 'not-a-date'], [new Date(), 'not-a-date'],

View file

@ -57,10 +57,8 @@ final class DateTimeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{DateTime, mixed}> */
* @return array<array{DateTime, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new DateTime(), 'now'], [new DateTime(), 'now'],
@ -85,10 +83,8 @@ final class DateTimeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{DateTime, mixed}> */
* @return array<array{DateTime, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new DateTime(), 'not-a-date'], [new DateTime(), 'not-a-date'],

View file

@ -23,10 +23,8 @@ use const NAN;
#[CoversClass(Decimal::class)] #[CoversClass(Decimal::class)]
final class DecimalTest extends RuleTestCase final class DecimalTest extends RuleTestCase
{ {
/** /** @return iterable<array{Decimal, mixed}> */
* @return array<array{Decimal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Decimal(0), 1], [new Decimal(0), 1],
@ -48,10 +46,8 @@ final class DecimalTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Decimal, mixed}> */
* @return array<array{Decimal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Decimal(1), '1.50'], [new Decimal(1), '1.50'],

View file

@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Digit::class)] #[CoversClass(Digit::class)]
final class DigitTest extends RuleTestCase final class DigitTest extends RuleTestCase
{ {
/** /** @return iterable<array{Digit, mixed}> */
* @return array<array{Digit, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'positive integer' => [new Digit(), 165], 'positive integer' => [new Digit(), 165],
@ -37,10 +35,8 @@ final class DigitTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Digit, mixed}> */
* @return array<array{Digit, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
'empty' => [new Digit(), ''], 'empty' => [new Digit(), ''],

View file

@ -22,10 +22,8 @@ use function dir;
#[CoversClass(Directory::class)] #[CoversClass(Directory::class)]
final class DirectoryTest extends RuleTestCase final class DirectoryTest extends RuleTestCase
{ {
/** /** @return iterable<array{Directory, mixed}> */
* @return array<array{Directory, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Directory(); $rule = new Directory();
@ -36,10 +34,8 @@ final class DirectoryTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Directory, mixed}> */
* @return array<array{Directory, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Directory(); $rule = new Directory();

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(Domain::class)] #[CoversClass(Domain::class)]
final class DomainTest extends RuleTestCase final class DomainTest extends RuleTestCase
{ {
/** /** @return iterable<array{Domain, mixed}> */
* @return array<array{Domain, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Domain(false), '111111111111domain.local'], [new Domain(false), '111111111111domain.local'],
@ -37,10 +35,8 @@ final class DomainTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Domain, mixed}> */
* @return array<array{Domain, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Domain(), null], [new Domain(), null],

View file

@ -70,10 +70,8 @@ final class EachTest extends RuleTestCase
} }
} }
/** /** @return iterable<array{Each, mixed}> */
* @return array<array{Each, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Each(Stub::pass(0)), []], [new Each(Stub::pass(0)), []],
@ -83,10 +81,8 @@ final class EachTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Each, mixed}> */
* @return array<array{Each, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Each(Stub::fail(0)), 123], [new Each(Stub::fail(0)), 123],

View file

@ -42,10 +42,8 @@ final class EmailTest extends RuleTestCase
self::assertTrue($sut->validate($input)); self::assertTrue($sut->validate($input));
} }
/** /** @return iterable<array{Email, mixed}> */
* @return array<array{Email, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new Email(null); $sut = new Email(null);
@ -57,10 +55,8 @@ final class EmailTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Email, mixed}> */
* @return array<array{Email, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new Email(null); $sut = new Email(null);

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(EndsWith::class)] #[CoversClass(EndsWith::class)]
final class EndsWithTest extends RuleTestCase final class EndsWithTest extends RuleTestCase
{ {
/** /** @return iterable<array{EndsWith, mixed}> */
* @return array<array{EndsWith, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new EndsWith('foo'), ['bar', 'foo']], [new EndsWith('foo'), ['bar', 'foo']],
@ -33,10 +31,8 @@ final class EndsWithTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{EndsWith, mixed}> */
* @return array<array{EndsWith, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new EndsWith('foo'), ''], [new EndsWith('foo'), ''],

View file

@ -29,10 +29,8 @@ final class EqualsTest extends RuleTestCase
self::assertSame($compareTo, $exception->getParam('compareTo')); self::assertSame($compareTo, $exception->getParam('compareTo'));
} }
/** /** @return iterable<array{Equals, mixed}> */
* @return array<array{Equals, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Equals('foo'), 'foo'], [new Equals('foo'), 'foo'],
@ -43,10 +41,8 @@ final class EqualsTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Equals, mixed}> */
* @return array<array{Equals, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Equals('foo'), ''], [new Equals('foo'), ''],

View file

@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Equivalent::class)] #[CoversClass(Equivalent::class)]
final class EquivalentTest extends RuleTestCase final class EquivalentTest extends RuleTestCase
{ {
/** /** @return iterable<array{Equivalent, mixed}> */
* @return array<array{Equivalent, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Equivalent(1), true], [new Equivalent(1), true],
@ -32,10 +30,8 @@ final class EquivalentTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Equivalent, mixed}> */
* @return array<array{Equivalent, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Equivalent(1), false], [new Equivalent(1), false],

View file

@ -19,10 +19,8 @@ use const INF;
#[CoversClass(Even::class)] #[CoversClass(Even::class)]
final class EvenTest extends RuleTestCase final class EvenTest extends RuleTestCase
{ {
/** /** @return iterable<array{Even, mixed}> */
* @return array<array{Even, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Even(), 2], [new Even(), 2],
@ -32,10 +30,8 @@ final class EvenTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Even, mixed}> */
* @return array<array{Even, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Even(), ''], [new Even(), ''],

View file

@ -19,10 +19,8 @@ use SplFileObject;
#[CoversClass(Executable::class)] #[CoversClass(Executable::class)]
final class ExecutableTest extends RuleTestCase final class ExecutableTest extends RuleTestCase
{ {
/** /** @return iterable<array{Executable, mixed}> */
* @return array<array{Executable, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Executable(); $rule = new Executable();
@ -33,10 +31,8 @@ final class ExecutableTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Executable, mixed}> */
* @return array<array{Executable, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Executable(); $rule = new Executable();

View file

@ -19,10 +19,8 @@ use SplFileObject;
#[CoversClass(Exists::class)] #[CoversClass(Exists::class)]
final class ExistsTest extends RuleTestCase final class ExistsTest extends RuleTestCase
{ {
/** /** @return iterable<array{Exists, mixed}> */
* @return array<array{Exists, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Exists(); $rule = new Exists();
@ -33,10 +31,8 @@ final class ExistsTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Exists, mixed}> */
* @return array<array{Exists, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Exists(); $rule = new Exists();

View file

@ -18,10 +18,8 @@ use SplFileInfo;
#[CoversClass(Extension::class)] #[CoversClass(Extension::class)]
final class ExtensionTest extends RuleTestCase final class ExtensionTest extends RuleTestCase
{ {
/** /** @return iterable<array{Extension, mixed}> */
* @return array<array{Extension, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'txt' => [new Extension('txt'), 'filename.txt'], 'txt' => [new Extension('txt'), 'filename.txt'],
@ -35,10 +33,8 @@ final class ExtensionTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Extension, mixed}> */
* @return array<array{Extension, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
'jpg' => [new Extension('jpg'), 'filename.txt'], 'jpg' => [new Extension('jpg'), 'filename.txt'],

View file

@ -25,10 +25,8 @@ use const PHP_INT_MAX;
#[CoversClass(Factor::class)] #[CoversClass(Factor::class)]
final class FactorTest extends RuleTestCase final class FactorTest extends RuleTestCase
{ {
/** /** @return iterable<array{Factor, mixed}> */
* @return array<array{Factor, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'1 is factor 1' => [new Factor(1), 1], '1 is factor 1' => [new Factor(1), 1],
@ -60,10 +58,8 @@ final class FactorTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Factor, mixed}> */
* @return array<array{Factor, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
'3 is not factor 2' => [new Factor(3), 2], '3 is not factor 2' => [new Factor(3), 2],

View file

@ -22,10 +22,8 @@ use const PHP_INT_MAX;
#[CoversClass(FalseVal::class)] #[CoversClass(FalseVal::class)]
final class FalseValTest extends RuleTestCase final class FalseValTest extends RuleTestCase
{ {
/** /** @return iterable<array{FalseVal, mixed}> */
* @return array<array{FalseVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new FalseVal(); $sut = new FalseVal();
@ -46,10 +44,8 @@ final class FalseValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{FalseVal, mixed}> */
* @return array<array{FalseVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new FalseVal(); $sut = new FalseVal();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Fibonacci::class)] #[CoversClass(Fibonacci::class)]
final class FibonacciTest extends RuleTestCase final class FibonacciTest extends RuleTestCase
{ {
/** /** @return iterable<array{Fibonacci, mixed}> */
* @return array<array{Fibonacci, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Fibonacci(); $rule = new Fibonacci();
@ -41,10 +39,8 @@ final class FibonacciTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Fibonacci, mixed}> */
* @return array<array{Fibonacci, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Fibonacci(); $rule = new Fibonacci();

View file

@ -22,10 +22,8 @@ use const PHP_INT_MAX;
#[CoversClass(File::class)] #[CoversClass(File::class)]
final class FileTest extends RuleTestCase final class FileTest extends RuleTestCase
{ {
/** /** @return iterable<array{File, mixed}> */
* @return array<array{File, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new File(); $sut = new File();
@ -36,10 +34,8 @@ final class FileTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{File, mixed}> */
* @return array<array{File, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new File(); $sut = new File();

View file

@ -39,10 +39,8 @@ final class FilterVarTest extends RuleTestCase
new FilterVar(FILTER_SANITIZE_EMAIL); new FilterVar(FILTER_SANITIZE_EMAIL);
} }
/** /** @return iterable<array{FilterVar, mixed}> */
* @return array<array{FilterVar, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new FilterVar(FILTER_VALIDATE_INT), '12345'], [new FilterVar(FILTER_VALIDATE_INT), '12345'],
@ -55,10 +53,8 @@ final class FilterVarTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{FilterVar, mixed}> */
* @return array<array{FilterVar, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new FilterVar(FILTER_VALIDATE_INT), 1.4], [new FilterVar(FILTER_VALIDATE_INT), 1.4],

View file

@ -23,10 +23,8 @@ use const PHP_INT_MAX;
#[CoversClass(Finite::class)] #[CoversClass(Finite::class)]
final class FiniteTest extends RuleTestCase final class FiniteTest extends RuleTestCase
{ {
/** /** @return iterable<array{Finite, mixed}> */
* @return array<array{Finite, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new Finite(); $sut = new Finite();
@ -41,10 +39,8 @@ final class FiniteTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Finite, mixed}> */
* @return array<array{Finite, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new Finite(); $sut = new Finite();

View file

@ -19,10 +19,8 @@ use const PHP_INT_MAX;
#[CoversClass(FloatType::class)] #[CoversClass(FloatType::class)]
final class FloatTypeTest extends RuleTestCase final class FloatTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{FloatType, mixed}> */
* @return array<array{FloatType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new FloatType(); $rule = new FloatType();
@ -37,10 +35,8 @@ final class FloatTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{FloatType, mixed}> */
* @return array<array{FloatType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new FloatType(); $rule = new FloatType();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(FloatVal::class)] #[CoversClass(FloatVal::class)]
final class FloatValTest extends RuleTestCase final class FloatValTest extends RuleTestCase
{ {
/** /** @return iterable<array{FloatVal, mixed}> */
* @return array<array{FloatVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new FloatVal(); $rule = new FloatVal();
@ -37,10 +35,8 @@ final class FloatValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{FloatVal, mixed}> */
* @return array<array{FloatVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new FloatVal(); $rule = new FloatVal();

View file

@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Graph::class)] #[CoversClass(Graph::class)]
final class GraphTest extends RuleTestCase final class GraphTest extends RuleTestCase
{ {
/** /** @return iterable<array{Graph, mixed}> */
* @return array<array{Graph, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$graph = new Graph(); $graph = new Graph();
@ -40,10 +38,8 @@ final class GraphTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Graph, mixed}> */
* @return array<array{Graph, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$graph = new Graph(); $graph = new Graph();

View file

@ -19,10 +19,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
#[CoversClass(GreaterThan::class)] #[CoversClass(GreaterThan::class)]
final class GreaterThanTest extends RuleTestCase final class GreaterThanTest extends RuleTestCase
{ {
/** /** @return iterable<array{GreaterThan, mixed}> */
* @return array<array{GreaterThan, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new GreaterThan(10), 11], [new GreaterThan(10), 11],
@ -33,10 +31,8 @@ final class GreaterThanTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{GreaterThan, mixed}> */
* @return array<array{GreaterThan, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new GreaterThan(10), 9], [new GreaterThan(10), 9],

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(HexRgbColor::class)] #[CoversClass(HexRgbColor::class)]
final class HexRgbColorTest extends RuleTestCase final class HexRgbColorTest extends RuleTestCase
{ {
/** /** @return iterable<array{HexRgbColor, mixed}> */
* @return array<array{HexRgbColor, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new HexRgbColor(); $sut = new HexRgbColor();
@ -40,10 +38,8 @@ final class HexRgbColorTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{HexRgbColor, mixed}> */
* @return array<array{HexRgbColor, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new HexRgbColor(); $sut = new HexRgbColor();

View file

@ -20,10 +20,8 @@ use function extension_loaded;
#[CoversClass(Iban::class)] #[CoversClass(Iban::class)]
final class IbanTest extends RuleTestCase final class IbanTest extends RuleTestCase
{ {
/** /** @return iterable<array{Iban, mixed}> */
* @return array<array{Iban, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new Iban(); $sut = new Iban();
@ -42,10 +40,8 @@ final class IbanTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Iban, mixed}> */
* @return array<array{Iban, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new Iban(); $sut = new Iban();

View file

@ -29,10 +29,8 @@ final class IdenticalTest extends RuleTestCase
self::assertSame($compareTo, $exception->getParam('compareTo')); self::assertSame($compareTo, $exception->getParam('compareTo'));
} }
/** /** @return iterable<array{Identical, mixed}> */
* @return array<array{Identical, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$object = new stdClass(); $object = new stdClass();
@ -45,10 +43,8 @@ final class IdenticalTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Identical, mixed}> */
* @return array<array{Identical, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Identical(42), '42'], [new Identical(42), '42'],

View file

@ -38,10 +38,8 @@ final class ImageTest extends RuleTestCase
self::assertTrue($rule->validate($input)); self::assertTrue($rule->validate($input));
} }
/** /** @return iterable<array{Image, mixed}> */
* @return array<array{Image, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Image(); $rule = new Image();
@ -55,10 +53,8 @@ final class ImageTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Image, mixed}> */
* @return array<array{Image, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Image(); $rule = new Image();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Imei::class)] #[CoversClass(Imei::class)]
final class ImeiTest extends RuleTestCase final class ImeiTest extends RuleTestCase
{ {
/** /** @return iterable<array{Imei, mixed}> */
* @return array<array{Imei, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Imei(); $rule = new Imei();
@ -37,10 +35,8 @@ final class ImeiTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Imei, mixed}> */
* @return array<array{Imei, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Imei(); $rule = new Imei();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(In::class)] #[CoversClass(In::class)]
final class InTest extends RuleTestCase final class InTest extends RuleTestCase
{ {
/** /** @return iterable<array{In, mixed}> */
* @return array<array{In, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new In(''), ''], [new In(''), ''],
@ -36,10 +34,8 @@ final class InTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{In, mixed}> */
* @return array<array{In, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new In('0'), null], [new In('0'), null],

View file

@ -21,10 +21,8 @@ use const PHP_INT_MAX;
#[CoversClass(Infinite::class)] #[CoversClass(Infinite::class)]
final class InfiniteTest extends RuleTestCase final class InfiniteTest extends RuleTestCase
{ {
/** /** @return iterable<array{Infinite, mixed}> */
* @return array<array{Infinite, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Infinite(); $rule = new Infinite();
@ -34,10 +32,8 @@ final class InfiniteTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Infinite, mixed}> */
* @return array<array{Infinite, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Infinite(); $rule = new Infinite();

View file

@ -23,10 +23,8 @@ use Traversable;
#[CoversClass(Instance::class)] #[CoversClass(Instance::class)]
final class InstanceTest extends RuleTestCase final class InstanceTest extends RuleTestCase
{ {
/** /** @return iterable<array{Instance, mixed}> */
* @return array<array{Instance, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Instance(DateTime::class), new DateTime()], [new Instance(DateTime::class), new DateTime()],
@ -35,10 +33,8 @@ final class InstanceTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Instance, mixed}> */
* @return array<array{Instance, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Instance(DateTime::class), ''], [new Instance(DateTime::class), ''],

View file

@ -19,10 +19,8 @@ use const PHP_INT_MAX;
#[CoversClass(IntType::class)] #[CoversClass(IntType::class)]
final class IntTypeTest extends RuleTestCase final class IntTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{IntType, mixed}> */
* @return array<array{IntType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new IntType(); $rule = new IntType();
@ -34,10 +32,8 @@ final class IntTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{IntType, mixed}> */
* @return array<array{IntType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new IntType(); $rule = new IntType();

View file

@ -20,10 +20,8 @@ use const PHP_INT_MAX;
#[CoversClass(IntVal::class)] #[CoversClass(IntVal::class)]
final class IntValTest extends RuleTestCase final class IntValTest extends RuleTestCase
{ {
/** /** @return iterable<array{IntVal, mixed}> */
* @return array<array{IntVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new IntVal(); $rule = new IntVal();
@ -45,10 +43,8 @@ final class IntValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{IntVal, mixed}> */
* @return array<array{IntVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new IntVal(); $rule = new IntVal();

View file

@ -50,10 +50,8 @@ final class IpTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Ip, mixed}> */
* @return array<array{Ip, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Ip('127.*'), '127.0.0.1'], [new Ip('127.*'), '127.0.0.1'],
@ -78,10 +76,8 @@ final class IpTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Ip, mixed}> */
* @return array<array{Ip, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Ip('127.*'), '192.0.1.0'], [new Ip('127.*'), '192.0.1.0'],

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Isbn::class)] #[CoversClass(Isbn::class)]
final class IsbnTest extends RuleTestCase final class IsbnTest extends RuleTestCase
{ {
/** /** @return iterable<array{Isbn, mixed}> */
* @return array<array{Isbn, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new Isbn(); $sut = new Isbn();
@ -35,10 +33,8 @@ final class IsbnTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Isbn, mixed}> */
* @return array<array{Isbn, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new Isbn(); $sut = new Isbn();

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(IterableType::class)] #[CoversClass(IterableType::class)]
final class IterableTypeTest extends RuleTestCase final class IterableTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{IterableType, mixed}> */
* @return array<array{IterableType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new IterableType(); $rule = new IterableType();
@ -33,10 +31,8 @@ final class IterableTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{IterableType, mixed}> */
* @return array<array{IterableType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new IterableType(); $rule = new IterableType();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Json::class)] #[CoversClass(Json::class)]
final class JsonTest extends RuleTestCase final class JsonTest extends RuleTestCase
{ {
/** /** @return iterable<array{Json, mixed}> */
* @return array<array{Json, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$json = new Json(); $json = new Json();
@ -38,10 +36,8 @@ final class JsonTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Json, mixed}> */
* @return array<array{Json, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$json = new Json(); $json = new Json();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(KeyValue::class)] #[CoversClass(KeyValue::class)]
final class KeyValueTest extends RuleTestCase final class KeyValueTest extends RuleTestCase
{ {
/** /** @return iterable<string, array{KeyValue, mixed}> */
* @return array<string, array{KeyValue, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'Equal values' => [new KeyValue('foo', 'equals', 'bar'), ['foo' => 42, 'bar' => 42]], 'Equal values' => [new KeyValue('foo', 'equals', 'bar'), ['foo' => 42, 'bar' => 42]],
@ -35,10 +33,8 @@ final class KeyValueTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<string, array{KeyValue, mixed}> */
* @return array<string, array{KeyValue, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$keyValue = new KeyValue('foo', 'equals', 'bar'); $keyValue = new KeyValue('foo', 'equals', 'bar');

View file

@ -28,10 +28,8 @@ final class LanguageCodeTest extends RuleTestCase
new LanguageCode('foo'); new LanguageCode('foo');
} }
/** /** @return iterable<array{LanguageCode, mixed}> */
* @return array<array{LanguageCode, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2); $sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2);
$sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3); $sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3);
@ -48,10 +46,8 @@ final class LanguageCodeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{LanguageCode, mixed}> */
* @return array<array{LanguageCode, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2); $sutAlpha2 = new LanguageCode(LanguageCode::ALPHA2);
$sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3); $sutAlpha3 = new LanguageCode(LanguageCode::ALPHA3);

View file

@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(LeapDate::class)] #[CoversClass(LeapDate::class)]
final class LeapDateTest extends RuleTestCase final class LeapDateTest extends RuleTestCase
{ {
/** /** @return iterable<array{LeapDate, mixed}> */
* @return array<array{LeapDate, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new LeapDate('Y-m-d'), '1988-02-29'], [new LeapDate('Y-m-d'), '1988-02-29'],
@ -31,10 +29,8 @@ final class LeapDateTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{LeapDate, mixed}> */
* @return array<array{LeapDate, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new LeapDate('Y-m-d'), '1989-02-29'], [new LeapDate('Y-m-d'), '1989-02-29'],

View file

@ -18,10 +18,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(LeapYear::class)] #[CoversClass(LeapYear::class)]
final class LeapYearTest extends RuleTestCase final class LeapYearTest extends RuleTestCase
{ {
/** /** @return iterable<array{LeapYear, mixed}> */
* @return array<array{LeapYear, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new LeapYear(); $rule = new LeapYear();
@ -34,10 +32,8 @@ final class LeapYearTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{LeapYear, mixed}> */
* @return array<array{LeapYear, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new LeapYear(); $rule = new LeapYear();

View file

@ -32,10 +32,8 @@ final class LengthTest extends RuleTestCase
new Length(10, 1); new Length(10, 1);
} }
/** /** @return iterable<array{Length, mixed}> */
* @return array<array{Length, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Length(1, 15), 'alganet'], [new Length(1, 15), 'alganet'],
@ -55,10 +53,8 @@ final class LengthTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Length, mixed}> */
* @return array<array{Length, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Length(1, 15), ''], [new Length(1, 15), ''],

View file

@ -19,10 +19,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
#[CoversClass(LessThan::class)] #[CoversClass(LessThan::class)]
final class LessThanTest extends RuleTestCase final class LessThanTest extends RuleTestCase
{ {
/** /** @return iterable<array{LessThan, mixed}> */
* @return array<array{LessThan, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new LessThan(10), 9], [new LessThan(10), 9],
@ -33,10 +31,8 @@ final class LessThanTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{LessThan, mixed}> */
* @return array<array{LessThan, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new LessThan(10), 10], [new LessThan(10), 10],

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Lowercase::class)] #[CoversClass(Lowercase::class)]
final class LowercaseTest extends RuleTestCase final class LowercaseTest extends RuleTestCase
{ {
/** /** @return iterable<array{Lowercase, mixed}> */
* @return array<array{Lowercase, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Lowercase(); $rule = new Lowercase();
@ -39,10 +37,8 @@ final class LowercaseTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Lowercase, mixed}> */
* @return array<array{Lowercase, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Lowercase(); $rule = new Lowercase();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Luhn::class)] #[CoversClass(Luhn::class)]
final class LuhnTest extends RuleTestCase final class LuhnTest extends RuleTestCase
{ {
/** /** @return iterable<array{Luhn, mixed}> */
* @return array<array{Luhn, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Luhn(); $rule = new Luhn();
@ -32,10 +30,8 @@ final class LuhnTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Luhn, mixed}> */
* @return array<array{Luhn, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Luhn(); $rule = new Luhn();

View file

@ -22,10 +22,8 @@ use const PHP_INT_MAX;
#[CoversClass(MacAddress::class)] #[CoversClass(MacAddress::class)]
final class MacAddressTest extends RuleTestCase final class MacAddressTest extends RuleTestCase
{ {
/** /** @return iterable<array{MacAddress, mixed}> */
* @return array<array{MacAddress, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new MacAddress(); $sut = new MacAddress();
@ -37,10 +35,8 @@ final class MacAddressTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{MacAddress, mixed}> */
* @return array<array{MacAddress, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new MacAddress(); $sut = new MacAddress();

View file

@ -24,10 +24,8 @@ use function strtotime;
#[CoversClass(MaxAge::class)] #[CoversClass(MaxAge::class)]
final class MaxAgeTest extends RuleTestCase final class MaxAgeTest extends RuleTestCase
{ {
/** /** @return iterable<array{MaxAge, mixed}> */
* @return array<array{MaxAge, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new MaxAge(30, 'Y-m-d'), date('Y-m-d', strtotime('30 years ago'))], [new MaxAge(30, 'Y-m-d'), date('Y-m-d', strtotime('30 years ago'))],
@ -37,10 +35,8 @@ final class MaxAgeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{MaxAge, mixed}> */
* @return array<array{MaxAge, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new MaxAge(30), new DateTime('30 years ago')], [new MaxAge(30), new DateTime('30 years ago')],

View file

@ -21,10 +21,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
#[CoversClass(Max::class)] #[CoversClass(Max::class)]
final class MaxTest extends RuleTestCase final class MaxTest extends RuleTestCase
{ {
/** /** @return iterable<array{Max, mixed}> */
* @return array<array{Max, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Max(10), 9], [new Max(10), 9],
@ -37,10 +35,8 @@ final class MaxTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Max, mixed}> */
* @return array<array{Max, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Max(10), 11], [new Max(10), 11],

View file

@ -49,10 +49,8 @@ final class MimetypeTest extends RuleTestCase
self::assertTrue($rule->validate($filename)); self::assertTrue($rule->validate($filename));
} }
/** /** @return iterable<array{Mimetype, mixed}> */
* @return array<array{Mimetype, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
'image/png' => [new Mimetype('image/png'), 'tests/fixtures/valid-image.png'], 'image/png' => [new Mimetype('image/png'), 'tests/fixtures/valid-image.png'],
@ -64,10 +62,8 @@ final class MimetypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Mimetype, mixed}> */
* @return array<array{Mimetype, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
'invalid file' => [new Mimetype('image/png'), 'tests/fixtures/invalid-image.png'], 'invalid file' => [new Mimetype('image/png'), 'tests/fixtures/invalid-image.png'],

View file

@ -24,10 +24,8 @@ use function strtotime;
#[CoversClass(MinAge::class)] #[CoversClass(MinAge::class)]
final class MinAgeTest extends RuleTestCase final class MinAgeTest extends RuleTestCase
{ {
/** /** @return iterable<array{MinAge, mixed}> */
* @return array<array{MinAge, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new MinAge(18, 'Y-m-d'), date('Y-m-d', strtotime('18 years ago'))], [new MinAge(18, 'Y-m-d'), date('Y-m-d', strtotime('18 years ago'))],
@ -37,10 +35,8 @@ final class MinAgeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{MinAge, mixed}> */
* @return array<array{MinAge, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new MinAge(18), new DateTime('18 years ago')], [new MinAge(18), new DateTime('18 years ago')],

View file

@ -21,10 +21,8 @@ use Respect\Validation\Test\Stubs\CountableStub;
#[CoversClass(Min::class)] #[CoversClass(Min::class)]
final class MinTest extends RuleTestCase final class MinTest extends RuleTestCase
{ {
/** /** @return iterable<array{Min, mixed}> */
* @return array<array{Min, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
// From documentation // From documentation
@ -52,10 +50,8 @@ final class MinTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Min, mixed}> */
* @return array<array{Min, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
// From documentation // From documentation

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Multiple::class)] #[CoversClass(Multiple::class)]
final class MultipleTest extends RuleTestCase final class MultipleTest extends RuleTestCase
{ {
/** /** @return iterable<array{Multiple, mixed}> */
* @return array<array{Multiple, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Multiple(5), 20], [new Multiple(5), 20],
@ -35,10 +33,8 @@ final class MultipleTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Multiple, mixed}> */
* @return array<array{Multiple, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Multiple(5), 11], [new Multiple(5), 11],

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Negative::class)] #[CoversClass(Negative::class)]
final class NegativeTest extends RuleTestCase final class NegativeTest extends RuleTestCase
{ {
/** /** @return iterable<array{Negative, mixed}> */
* @return array<array{Negative, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Negative(); $rule = new Negative();
@ -32,10 +30,8 @@ final class NegativeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Negative, mixed}> */
* @return array<array{Negative, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Negative(); $rule = new Negative();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(NfeAccessKey::class)] #[CoversClass(NfeAccessKey::class)]
final class NfeAccessKeyTest extends RuleTestCase final class NfeAccessKeyTest extends RuleTestCase
{ {
/** /** @return iterable<array{NfeAccessKey, mixed}> */
* @return array<array{NfeAccessKey, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$nfe = new NfeAccessKey(); $nfe = new NfeAccessKey();
@ -29,10 +27,8 @@ final class NfeAccessKeyTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NfeAccessKey, mixed}> */
* @return array<array{NfeAccessKey, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$nfe = new NfeAccessKey(); $nfe = new NfeAccessKey();

View file

@ -20,10 +20,8 @@ use function stream_context_create;
#[CoversClass(Nif::class)] #[CoversClass(Nif::class)]
final class NifTest extends RuleTestCase final class NifTest extends RuleTestCase
{ {
/** /** @return iterable<array{Nif, mixed}> */
* @return array<array{Nif, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Nif(); $rule = new Nif();
@ -52,10 +50,8 @@ final class NifTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Nif, mixed}> */
* @return array<array{Nif, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Nif(); $rule = new Nif();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(Nip::class)] #[CoversClass(Nip::class)]
final class NipTest extends RuleTestCase final class NipTest extends RuleTestCase
{ {
/** /** @return iterable<array{Nip, mixed}> */
* @return array<array{Nip, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Nip(); $rule = new Nip();
@ -32,10 +30,8 @@ final class NipTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Nip, mixed}> */
* @return array<array{Nip, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Nip(); $rule = new Nip();

View file

@ -76,10 +76,8 @@ final class NoTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{No, mixed}> */
* @return array<array{No, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new No(); $sut = new No();
@ -93,10 +91,8 @@ final class NoTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{No, mixed}> */
* @return array<array{No, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new No(); $sut = new No();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(NoWhitespace::class)] #[CoversClass(NoWhitespace::class)]
final class NoWhitespaceTest extends RuleTestCase final class NoWhitespaceTest extends RuleTestCase
{ {
/** /** @return iterable<array{NoWhitespace, mixed}> */
* @return array<array{NoWhitespace, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new NoWhitespace(); $rule = new NoWhitespace();
@ -33,10 +31,8 @@ final class NoWhitespaceTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NoWhitespace, mixed}> */
* @return array<array{NoWhitespace, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new NoWhitespace(); $rule = new NoWhitespace();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(NotBlank::class)] #[CoversClass(NotBlank::class)]
final class NotBlankTest extends RuleTestCase final class NotBlankTest extends RuleTestCase
{ {
/** /** @return iterable<array{NotBlank, mixed}> */
* @return array<array{NotBlank, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$object = new stdClass(); $object = new stdClass();
$object->foo = true; $object->foo = true;
@ -37,10 +35,8 @@ final class NotBlankTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NotBlank, mixed}> */
* @return array<array{NotBlank, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new NotBlank(); $rule = new NotBlank();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(NotEmoji::class)] #[CoversClass(NotEmoji::class)]
final class NotEmojiTest extends RuleTestCase final class NotEmojiTest extends RuleTestCase
{ {
/** /** @return iterable<array{NotEmoji, mixed}> */
* @return array<array{NotEmoji, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$sut = new NotEmoji(); $sut = new NotEmoji();
@ -36,10 +34,8 @@ final class NotEmojiTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NotEmoji, mixed}> */
* @return array<array{NotEmoji, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$sut = new NotEmoji(); $sut = new NotEmoji();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(NotEmpty::class)] #[CoversClass(NotEmpty::class)]
final class NotEmptyTest extends RuleTestCase final class NotEmptyTest extends RuleTestCase
{ {
/** /** @return iterable<array{NotEmpty, mixed}> */
* @return array<array{NotEmpty, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new NotEmpty(); $rule = new NotEmpty();
@ -34,10 +32,8 @@ final class NotEmptyTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NotEmpty, mixed}> */
* @return array<array{NotEmpty, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new NotEmpty(); $rule = new NotEmpty();

View file

@ -18,10 +18,8 @@ use stdClass;
#[CoversClass(NotOptional::class)] #[CoversClass(NotOptional::class)]
final class NotOptionalTest extends RuleTestCase final class NotOptionalTest extends RuleTestCase
{ {
/** /** @return iterable<array{NotOptional, mixed}> */
* @return array<array{NotOptional, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new NotOptional(); $rule = new NotOptional();
@ -43,10 +41,8 @@ final class NotOptionalTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NotOptional, mixed}> */
* @return array<array{NotOptional, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new NotOptional(); $rule = new NotOptional();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(NullType::class)] #[CoversClass(NullType::class)]
final class NullTypeTest extends RuleTestCase final class NullTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{NullType, mixed}> */
* @return array<array{NullType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new NullType(); $rule = new NullType();
@ -29,10 +27,8 @@ final class NullTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NullType, mixed}> */
* @return array<array{NullType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new NullType(); $rule = new NullType();

View file

@ -25,10 +25,8 @@ use const PHP_INT_MAX;
#[CoversClass(Number::class)] #[CoversClass(Number::class)]
final class NumberTest extends RuleTestCase final class NumberTest extends RuleTestCase
{ {
/** /** @return iterable<array{Number, mixed}> */
* @return array<array{Number, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Number(); $rule = new Number();
@ -44,10 +42,8 @@ final class NumberTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Number, mixed}> */
* @return array<array{Number, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Number(); $rule = new Number();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(NumericVal::class)] #[CoversClass(NumericVal::class)]
final class NumericValTest extends RuleTestCase final class NumericValTest extends RuleTestCase
{ {
/** /** @return iterable<array{NumericVal, mixed}> */
* @return array<array{NumericVal, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$numericVal = new NumericVal(); $numericVal = new NumericVal();
@ -34,10 +32,8 @@ final class NumericValTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{NumericVal, mixed}> */
* @return array<array{NumericVal, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$numericVal = new NumericVal(); $numericVal = new NumericVal();

View file

@ -19,10 +19,8 @@ use stdClass;
#[CoversClass(ObjectType::class)] #[CoversClass(ObjectType::class)]
final class ObjectTypeTest extends RuleTestCase final class ObjectTypeTest extends RuleTestCase
{ {
/** /** @return iterable<array{ObjectType, mixed}> */
* @return array<array{ObjectType, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new ObjectType(); $rule = new ObjectType();
@ -32,10 +30,8 @@ final class ObjectTypeTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{ObjectType, mixed}> */
* @return array<array{ObjectType, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new ObjectType(); $rule = new ObjectType();

View file

@ -20,10 +20,8 @@ use function tmpfile;
#[CoversClass(Odd::class)] #[CoversClass(Odd::class)]
final class OddTest extends RuleTestCase final class OddTest extends RuleTestCase
{ {
/** /** @return iterable<array{Odd, mixed}> */
* @return array<array{Odd, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Odd(); $rule = new Odd();
@ -35,10 +33,8 @@ final class OddTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Odd, mixed}> */
* @return array<array{Odd, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Odd(); $rule = new Odd();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(PerfectSquare::class)] #[CoversClass(PerfectSquare::class)]
final class PerfectSquareTest extends RuleTestCase final class PerfectSquareTest extends RuleTestCase
{ {
/** /** @return iterable<array{PerfectSquare, mixed}> */
* @return array<array{PerfectSquare, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new PerfectSquare(); $rule = new PerfectSquare();
@ -38,10 +36,8 @@ final class PerfectSquareTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{PerfectSquare, mixed}> */
* @return array<array{PerfectSquare, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new PerfectSquare(); $rule = new PerfectSquare();

View file

@ -17,10 +17,8 @@ use Respect\Validation\Test\RuleTestCase;
#[CoversClass(Pesel::class)] #[CoversClass(Pesel::class)]
final class PeselTest extends RuleTestCase final class PeselTest extends RuleTestCase
{ {
/** /** @return iterable<array{Pesel, mixed}> */
* @return array<array{Pesel, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new Pesel(); $rule = new Pesel();
@ -36,10 +34,8 @@ final class PeselTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Pesel, mixed}> */
* @return array<array{Pesel, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new Pesel(); $rule = new Pesel();

View file

@ -38,10 +38,8 @@ final class PhoneTest extends RuleTestCase
$phoneValidator->assert('abc'); $phoneValidator->assert('abc');
} }
/** /** @return iterable<array{Phone, mixed}> */
* @return array<array{Phone, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
return [ return [
[new Phone(), '+1 650 253 00 00'], [new Phone(), '+1 650 253 00 00'],
@ -55,10 +53,8 @@ final class PhoneTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{Phone, mixed}> */
* @return array<array{Phone, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
return [ return [
[new Phone(), '+1-650-253-00-0'], [new Phone(), '+1-650-253-00-0'],

View file

@ -24,10 +24,8 @@ use function uniqid;
#[CoversClass(PhpLabel::class)] #[CoversClass(PhpLabel::class)]
final class PhpLabelTest extends RuleTestCase final class PhpLabelTest extends RuleTestCase
{ {
/** /** @return iterable<array{PhpLabel, mixed}> */
* @return array<array{PhpLabel, mixed}> public static function providerForValidInput(): iterable
*/
public static function providerForValidInput(): array
{ {
$rule = new PhpLabel(); $rule = new PhpLabel();
@ -42,10 +40,8 @@ final class PhpLabelTest extends RuleTestCase
]; ];
} }
/** /** @return iterable<array{PhpLabel, mixed}> */
* @return array<array{PhpLabel, mixed}> public static function providerForInvalidInput(): iterable
*/
public static function providerForInvalidInput(): array
{ {
$rule = new PhpLabel(); $rule = new PhpLabel();

Some files were not shown because too many files have changed in this diff Show more