Skip to content

Commit e460abe

Browse files
committed
Improve rule definitions
- Use active voice - Remove final fullstop - Use code style
1 parent 3591920 commit e460abe

76 files changed

Lines changed: 76 additions & 77 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

rules/AnnotationsToAttributes/Rector/ClassMethod/TestWithAnnotationToAttributeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
public function getRuleDefinition(): RuleDefinition
4646
{
4747
return new RuleDefinition(
48-
'Change @testWith() annotation to #[TestWith] attribute',
48+
'Change `@testWith()` annotation to `#[TestWith]` attribute',
4949
[
5050
new CodeSample(
5151
<<<'CODE_SAMPLE'

rules/AnnotationsToAttributes/Rector/Class_/RequiresAnnotationWithValueToAttributeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737

3838
public function getRuleDefinition(): RuleDefinition
3939
{
40-
return new RuleDefinition('Change Requires annotations with values to attributes', [
40+
return new RuleDefinition('Change requires annotations with values to attributes', [
4141
new CodeSample(
4242
<<<'CODE_SAMPLE'
4343
use PHPUnit\Framework\TestCase;

rules/CodeQuality/Rector/ClassMethod/AddKeysExistsAssertForKeyUseRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
public function getRuleDefinition(): RuleDefinition
3939
{
4040
return new RuleDefinition(
41-
'Add assertArrayHasKey() call for array access with string key, that was not validated before',
41+
'Add `assertArrayHasKey()` call for array access with string key, that was not validated before',
4242
[
4343
new CodeSample(
4444
<<<'CODE_SAMPLE'

rules/CodeQuality/Rector/ClassMethod/ChangeMockObjectReturnUnionToIntersectionRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function refactor(Node $node): ?ClassMethod
7575
public function getRuleDefinition(): RuleDefinition
7676
{
7777
return new RuleDefinition(
78-
'Change a MockObject @return union docblock to an intersection type',
78+
'Change a MockObject `@return` union docblock to an intersection type',
7979
[
8080
new CodeSample(
8181
<<<'CODE_SAMPLE'

rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class CreateMockToAnonymousClassRector extends AbstractRector implements D
1919
{
2020
public function getRuleDefinition(): RuleDefinition
2121
{
22-
return new RuleDefinition('Change $this->createMock() with methods to direct anonymous class', [
22+
return new RuleDefinition('Change `$this->createMock()` with methods to direct anonymous class', [
2323
new CodeSample(
2424
<<<'CODE_SAMPLE'
2525
use PHPUnit\Framework\TestCase;

rules/CodeQuality/Rector/ClassMethod/NoSetupWithParentCallOverrideRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
public function getRuleDefinition(): RuleDefinition
2929
{
3030
return new RuleDefinition(
31-
'Remove override attribute, if setUp()/tearDown() references parent call to improve readability',
31+
'Remove override attribute, if `setUp()`/`tearDown()` references parent call to improve readability',
3232
[
3333
new CodeSample(
3434
<<<'CODE_SAMPLE'

rules/CodeQuality/Rector/ClassMethod/ReplaceTestAnnotationWithPrefixedFunctionRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232

3333
public function getRuleDefinition(): RuleDefinition
3434
{
35-
return new RuleDefinition('Replace @test with prefixed function', [
35+
return new RuleDefinition('Replace `@test` with prefixed function', [
3636
new CodeSample(
3737
<<<'CODE_SAMPLE'
3838
class SomeTest extends \PHPUnit\Framework\TestCase

rules/CodeQuality/Rector/ClassMethod/ReplaceTestFunctionPrefixWithAttributeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929

3030
public function getRuleDefinition(): RuleDefinition
3131
{
32-
return new RuleDefinition('Replace @test with prefixed function', [
32+
return new RuleDefinition('Replace test function prefix with `#[Test]` attribute', [
3333
new CodeSample(
3434
<<<'CODE_SAMPLE'
3535
class SomeTest extends \PHPUnit\Framework\TestCase

rules/CodeQuality/Rector/Class_/AddParamTypeFromDependsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
public function getRuleDefinition(): RuleDefinition
3838
{
3939
return new RuleDefinition(
40-
'Add param type declaration based on @depends test method return type',
40+
'Add param type declaration based on `@depends` test method return type',
4141
[
4242
new CodeSample(
4343
<<<'CODE_SAMPLE'

rules/CodeQuality/Rector/Class_/AddParentSetupCallOnSetupRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class AddParentSetupCallOnSetupRector extends AbstractRector implements De
2020
public function getRuleDefinition(): RuleDefinition
2121
{
2222
return new RuleDefinition(
23-
'Add missing parent::setUp() call on setUp() method on test class',
23+
'Add missing `parent::setUp()` call on `setUp()` method on test class',
2424
[
2525
new CodeSample(
2626
<<<'CODE_SAMPLE'

0 commit comments

Comments
 (0)