Apply "Generic.NamingConventions.CamelCapsFunctionName"

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2019-02-07 20:13:01 +01:00
commit 1cccfd00a0
No known key found for this signature in database
GPG key ID: 221E9281655813A6
13 changed files with 20 additions and 19 deletions

View file

@ -23,6 +23,7 @@
<property name="spacing" value="0" />
</properties>
</rule>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName" />
<rule ref="Generic.PHP.NoSilencedErrors" />
<rule ref="Generic.Strings.UnnecessaryStringConcat">
<properties>

View file

@ -39,7 +39,7 @@ class NestedValidationExceptionTest extends TestCase
/**
* @test
*/
public function addingTheSameInstanceShouldAddJustASingleReference(): void
public function addingTheSameInstanceShouldAddJustOneSingleReference(): void
{
$composite = new AttributeException('input', 'id', [], 'trim');
$node = new IntValException('input', 'id', [], 'trim');

View file

@ -62,7 +62,7 @@ final class ValidationExceptionTest extends TestCase
/**
* @test
*/
public function itShouldRetrieveASingleParameter(): void
public function itShouldRetrieveOneSingleParameter(): void
{
$name = 'any name';
$value = 'any value';
@ -85,7 +85,7 @@ final class ValidationExceptionTest extends TestCase
/**
* @test
*/
public function itShouldHaveADefaultTemplate(): void
public function itShouldHaveTemplateByDefault(): void
{
$sut = new ValidationException('input', 'id', [], 'trim');

View file

@ -39,7 +39,7 @@ final class FactoryTest extends TestCase
/**
* @test
*/
public function shouldCreateARuleByNameBasedOnNamespace(): void
public function shouldCreateRuleByNameBasedOnNamespace(): void
{
$factory = new Factory([self::TEST_RULES_NAMESPACE], [], 'trim');
@ -59,7 +59,7 @@ final class FactoryTest extends TestCase
/**
* @test
*/
public function shouldDefineConstructorArgumentsWhenCreatingARule(): void
public function shouldDefineConstructorArgumentsWhenCreatingRule(): void
{
$constructorArguments = [true, false, true, false];

View file

@ -92,7 +92,7 @@ final class AbstractCompositeTest extends TestCase
/**
* @test
*/
public function shouldNotUpdateInternalRuleAlreadyHasAName(): void
public function shouldNotUpdateInternalRuleWhenItAlreadyHasName(): void
{
$rule = $this->createMock(Validatable::class);
$rule
@ -140,7 +140,7 @@ final class AbstractCompositeTest extends TestCase
/**
* @test
*/
public function shouldDefineNameForInternalRulesWhenItHasNotAName(): void
public function shouldDefineNameForInternalRulesWhenItDoesNotHaveName(): void
{
$ruleName = 'something';
@ -166,7 +166,7 @@ final class AbstractCompositeTest extends TestCase
/**
* @test
*/
public function shouldNotDefineNameForInternalRulesWhenItHasAName(): void
public function shouldNotDefineNameForInternalRulesWhenItAlreadyHasName(): void
{
$ruleName = 'something';

View file

@ -125,7 +125,7 @@ final class AbstractRelatedTest extends TestCase
/**
* @test
*/
public function shouldDefineRuleNameAsReferenceWhenRuleDoesNotHaveAName(): void
public function shouldDefineRuleNameAsReferenceWhenRuleDoesNotHaveName(): void
{
$reference = 'something';
@ -150,7 +150,7 @@ final class AbstractRelatedTest extends TestCase
/**
* @test
*/
public function shouldNotDefineRuleNameAsReferenceWhenRuleDoesHaveAName(): void
public function shouldNotDefineRuleNameAsReferenceWhenRuleDoesHaveName(): void
{
$reference = 'something';

View file

@ -47,7 +47,7 @@ final class AlwaysInvalidTest extends TestCase
*
* @dataProvider providerForInvalidInput
*/
public function itShouldValidateInputWhenItIsAValidAlwaysInvalid($input): void
public function itShouldAlwaysBeInvalid($input): void
{
$rule = new AlwaysInvalid();

View file

@ -47,7 +47,7 @@ final class AlwaysValidTest extends TestCase
*
* @dataProvider providerForValidInput
*/
public function itShouldValidateInputWhenItIsAValidAlwaysValid($input): void
public function itAlwaysBeValid($input): void
{
$rule = new AlwaysValid();

View file

@ -35,7 +35,7 @@ final class CallbackTest extends RuleTestCase
{
return [
[new Callback('is_a', 'stdClass'), new \stdClass()],
[new Callback([$this, 'thisIsASampleCallbackUsedInsideThisTest']), 'test'],
[new Callback([$this, 'sampleCallbackUsedInsideThisTest']), 'test'],
[new Callback('is_string'), 'test'],
[
new Callback(function () {
@ -46,7 +46,7 @@ final class CallbackTest extends RuleTestCase
];
}
public function thisIsASampleCallbackUsedInsideThisTest()
public function sampleCallbackUsedInsideThisTest()
{
return true;
}

View file

@ -31,7 +31,7 @@ class HexRgbColorTest extends TestCase
*
* @test
*/
public function hexRgbColorValuesONLYShouldReturnTrue($validHexRgbColor): void
public function hexRgbColorValuesOnlyShouldReturnTrue($validHexRgbColor): void
{
$validator = new HexRgbColor();

View file

@ -70,7 +70,7 @@ final class KeySetTest extends TestCase
* @expectedException \Respect\Validation\Exceptions\ComponentException
* @expectedExceptionMessage KeySet rule accepts only Key rules
*/
public function shouldNotAcceptAllOfWithANonKeyRule(): void
public function shouldNotAcceptAllOfWithNonKeyRule(): void
{
$alwaysValid = new AlwaysValid();
$allOf = new AllOf($alwaysValid);
@ -84,7 +84,7 @@ final class KeySetTest extends TestCase
* @expectedException \Respect\Validation\Exceptions\ComponentException
* @expectedExceptionMessage KeySet rule accepts only Key rules
*/
public function shouldNotAcceptANonKeyRule(): void
public function shouldNotAcceptNonKeyRule(): void
{
$alwaysValid = new AlwaysValid();

View file

@ -55,7 +55,7 @@ final class SfTest extends TestCase
/**
* @test
*/
public function itShouldHaveAValidatorByDefault(): void
public function itShouldHaveTheValidatorByDefault(): void
{
$sut = new Sf(new IsNull());

View file

@ -49,7 +49,7 @@ class SubdivisionCodeTest extends TestCase
/**
* @test
*/
public function shouldDefineASubdivisionCodeFormatOnConstructor(): void
public function shouldDefineSubdivisionCodeFormatOnConstructor(): void
{
$countryCode = 'US';
$countrySubdivision = new SubdivisionCode($countryCode);