mirror of
https://github.com/Respect/Validation.git
synced 2024-06-07 08:12:16 +02:00
Apply "SlevomatCodingStandard.Arrays.TrailingArrayComma"
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
147804287b
commit
6efb9db429
|
@ -33,6 +33,7 @@
|
|||
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing" />
|
||||
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
|
||||
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
|
||||
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma" />
|
||||
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
|
||||
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
|
||||
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference" />
|
||||
|
|
|
@ -51,13 +51,13 @@ final class AttributeTest extends RuleTestCase
|
|||
'attribute is present without extra validator' => [new Attribute('bar'), $obj],
|
||||
'private attribute is present without extra validator' => [
|
||||
new Attribute('bar'),
|
||||
$this
|
||||
$this,
|
||||
],
|
||||
'attribute is present with extra validator' => [new Attribute('bar', $extraValidator), $obj],
|
||||
'non mandatory attribute is not present' => [new Attribute('foo', null, false), $obj],
|
||||
'non mandatory attribute is not present with extra validator' => [
|
||||
new Attribute('foo', $extraValidator, false),
|
||||
$obj
|
||||
$obj,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ final class AttributeTest extends RuleTestCase
|
|||
'attribute is absent without extra validator' => [new Attribute('barr'), $obj],
|
||||
'private attribute is not valid based on extra validator' => [
|
||||
new Attribute('bar', $extraValidatorMock),
|
||||
$this
|
||||
$this,
|
||||
],
|
||||
'value provided is an empty string' => [new Attribute('barr'), ''],
|
||||
'validator related to attribute does not validate' => [new Attribute('bar', $extraValidatorMock), $obj],
|
||||
|
|
|
@ -38,7 +38,7 @@ final class CallableTypeTest extends RuleTestCase
|
|||
[
|
||||
$rule,
|
||||
static function (): void {
|
||||
}
|
||||
},
|
||||
],
|
||||
[$rule, 'trim'],
|
||||
[$rule, __METHOD__],
|
||||
|
|
|
@ -41,7 +41,7 @@ final class CallbackTest extends RuleTestCase
|
|||
new Callback(static function () {
|
||||
return true;
|
||||
}),
|
||||
'wpoiur'
|
||||
'wpoiur',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -61,13 +61,13 @@ final class CallbackTest extends RuleTestCase
|
|||
new Callback(static function () {
|
||||
return false;
|
||||
}),
|
||||
'w poiur'
|
||||
'w poiur',
|
||||
],
|
||||
[
|
||||
new Callback(static function () {
|
||||
return false;
|
||||
}),
|
||||
''
|
||||
'',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ final class FactorTest extends RuleTestCase
|
|||
'mt_rand is not factor calc' => [new Factor(mt_rand()), mt_rand(1, mt_getrandmax() - 1) / mt_getrandmax()],
|
||||
'mt_rand is not factor -calc' => [
|
||||
new Factor(mt_rand()),
|
||||
-(mt_rand(1, mt_getrandmax() - 1) / mt_getrandmax())
|
||||
-(mt_rand(1, mt_getrandmax() - 1) / mt_getrandmax()),
|
||||
],
|
||||
'mt_rand is not factor \'a\'' => [new Factor(mt_rand()), 'a'],
|
||||
'mt_rand is not factor \'foo\'' => [new Factor(mt_rand()), 'foo'],
|
||||
|
|
|
@ -64,7 +64,7 @@ final class MacAddressTest extends RuleTestCase
|
|||
'callable' => [
|
||||
$sut,
|
||||
static function (): void {
|
||||
}
|
||||
},
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ final class ResourceTypeTest extends RuleTestCase
|
|||
[
|
||||
$rule,
|
||||
static function (): void {
|
||||
}
|
||||
},
|
||||
],
|
||||
[$rule, new stdClass()],
|
||||
[$rule, null],
|
||||
|
|
|
@ -54,7 +54,7 @@ final class ScalarValTest extends RuleTestCase
|
|||
[
|
||||
$rule,
|
||||
static function (): void {
|
||||
}
|
||||
},
|
||||
],
|
||||
[$rule, new \stdClass()],
|
||||
[$rule, null],
|
||||
|
|
|
@ -50,7 +50,7 @@ class TypeTest extends RuleTestCase
|
|||
[
|
||||
new Type('callable'),
|
||||
static function (): void {
|
||||
}
|
||||
},
|
||||
],
|
||||
[new Type('double'), 0.8],
|
||||
[new Type('float'), 1.0],
|
||||
|
|
Loading…
Reference in a new issue