Apply "SlevomatCodingStandard.Arrays.TrailingArrayComma"

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2019-02-09 12:57:50 +01:00
parent 147804287b
commit 6efb9db429
No known key found for this signature in database
GPG key ID: 221E9281655813A6
9 changed files with 13 additions and 12 deletions

View file

@ -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" />

View file

@ -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],

View file

@ -38,7 +38,7 @@ final class CallableTypeTest extends RuleTestCase
[
$rule,
static function (): void {
}
},
],
[$rule, 'trim'],
[$rule, __METHOD__],

View file

@ -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;
}),
''
'',
],
];
}

View file

@ -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'],

View file

@ -64,7 +64,7 @@ final class MacAddressTest extends RuleTestCase
'callable' => [
$sut,
static function (): void {
}
},
],
];
}

View file

@ -57,7 +57,7 @@ final class ResourceTypeTest extends RuleTestCase
[
$rule,
static function (): void {
}
},
],
[$rule, new stdClass()],
[$rule, null],

View file

@ -54,7 +54,7 @@ final class ScalarValTest extends RuleTestCase
[
$rule,
static function (): void {
}
},
],
[$rule, new \stdClass()],
[$rule, null],

View file

@ -50,7 +50,7 @@ class TypeTest extends RuleTestCase
[
new Type('callable'),
static function (): void {
}
},
],
[new Type('double'), 0.8],
[new Type('float'), 1.0],