Skip to content

Commit f969a30

Browse files
authored
Rename PhpDocPropertySorterFixer to PhpdocPropertySortedFixer (#1090)
1 parent 5a4d717 commit f969a30

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG for PHP CS Fixer: custom fixers
22

3+
## v3.34.0
4+
- Add PhpdocPropertySortedFixer
5+
36
## v3.33.0
47
- Add PhpDocPropertySorterFixer
58
- Deprecate PhpdocTagNoNamedArgumentsFixer - use "phpdoc_tag_no_named_arguments"

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -461,19 +461,6 @@ Configuration options:
461461
+echo 01234567; // octal
462462
```
463463

464-
#### PhpDocPropertySorterFixer
465-
Sorts @property annotations in PHPDoc blocks alphabetically within groups separated by empty lines.
466-
```diff
467-
<?php
468-
/**
469-
- * @property string $zzz
470-
* @property int $aaa
471-
* @property bool $mmm
472-
+ * @property string $zzz
473-
*/
474-
class Foo {}
475-
```
476-
477464
#### PhpUnitAssertArgumentsOrderFixer
478465
PHPUnit assertions must have expected argument before actual one.
479466
*Risky: when original PHPUnit methods are overwritten.*
@@ -615,6 +602,19 @@ The `@param` annotations must have a type.
615602
function a($foo, $bar) {}
616603
```
617604

605+
#### PhpdocPropertySortedFixer
606+
Sorts @property annotations in PHPDoc blocks alphabetically within groups separated by empty lines.
607+
```diff
608+
<?php
609+
/**
610+
- * @property string $zzz
611+
* @property int $aaa
612+
* @property bool $mmm
613+
+ * @property string $zzz
614+
*/
615+
class Foo {}
616+
```
617+
618618
#### PhpdocSelfAccessorFixer
619619
In PHPDoc, the class or interface element `self` must be used instead of the class name itself.
620620
```diff

src/Fixer/PhpDocPropertySorterFixer.php renamed to src/Fixer/PhpdocPropertySortedFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @no-named-arguments
2323
*/
24-
final class PhpDocPropertySorterFixer extends AbstractFixer
24+
final class PhpdocPropertySortedFixer extends AbstractFixer
2525
{
2626
public function getDefinition(): FixerDefinitionInterface
2727
{

tests/Fixer/PhpDocPropertySorterFixerTest.php renamed to tests/Fixer/PhpdocPropertySortedFixerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
/**
1515
* @internal
1616
*
17-
* @covers \PhpCsFixerCustomFixers\Fixer\PhpDocPropertySorterFixer
17+
* @covers \PhpCsFixerCustomFixers\Fixer\PhpdocPropertySortedFixer
1818
*/
19-
final class PhpDocPropertySorterFixerTest extends AbstractFixerTestCase
19+
final class PhpdocPropertySortedFixerTest extends AbstractFixerTestCase
2020
{
2121
public function testIsRisky(): void
2222
{

0 commit comments

Comments
 (0)