File tree Expand file tree Collapse file tree 5 files changed +6
-7
lines changed
Expand file tree Collapse file tree 5 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 33/.php-cs-fixer.cache
44/.phpunit.result.cache
55/.build
6+ /coverage-report
67/php-cs-fixer.xml
78/phpstan.xml
89/site
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ class MyClass
3636 * MyClass.
3737 *
3838 * @author Your Name <your @email.org >
39- * @package MyPackage
4039 */
4140class MyClass
4241{
@@ -58,6 +57,9 @@ composer require --dev konradmichalik/php-doc-block-header-fixer
5857
5958Add the PHP-CS-Fixer rule in your ` .php-cs-fixer.php ` file:
6059
60+ > [ !NOTE]
61+ > This fixer is compatible with standard PHP-CS-Fixer rules. It avoids adding annotations that conflict with rules like ` phpdoc_no_package ` and follows spacing conventions compatible with ` phpdoc_separation ` .
62+
6163``` php
6264<?php
6365// ...
@@ -71,7 +73,6 @@ return (new PhpCsFixer\Config())
7173 'annotations' => [
7274 'author' => 'Konrad Michalik <hej @konradmichalik.dev >',
7375 'license' => 'GPL-3.0-or-later',
74- 'package' => 'PhpDocBlockHeaderFixer',
7576 ],
7677 'preserve_existing' => true,
7778 'separate' => 'none',
@@ -96,7 +97,6 @@ return (new PhpCsFixer\Config())
9697 [
9798 'author' => 'Konrad Michalik <hej @konradmichalik.dev >',
9899 'license' => 'GPL-3.0-or-later',
99- 'package' => 'PhpDocBlockHeaderFixer',
100100 ],
101101 preserveExisting: true,
102102 separate: \KonradMichalik\PhpDocBlockHeaderFixer\Enum\Separate::None,
Original file line number Diff line number Diff line change 11{
22 "name" : " konradmichalik/php-doc-block-header-fixer" ,
3- "description" : " " ,
3+ "description" : " This packages contains a PHP-CS-Fixer rule to automatically fix the class header regarding PHP DocBlocks. " ,
44 "license" : " GPL-3.0-or-later" ,
55 "type" : " library" ,
66 "authors" : [
Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ public function testValidateAnnotationsWithValidKeys(): void
125125 'license ' => 'MIT ' ,
126126 'version ' => '1.0.0 ' ,
127127 'since ' => '1.0.0 ' ,
128- 'package ' => 'MyPackage ' ,
129128 'subpackage ' => 'SubPackage ' ,
130129 'see ' => 'https://example.com ' ,
131130 'link ' => 'https://example.com ' ,
Original file line number Diff line number Diff line change @@ -97,10 +97,9 @@ public function testBuildDocBlockWithMultipleAnnotations(): void
9797 $ result = $ method ->invoke ($ this ->fixer , [
9898 'author ' => 'John Doe <john@example.com> ' ,
9999 'license ' => 'MIT ' ,
100- 'package ' => 'MyPackage ' ,
101100 ], '' );
102101
103- $ expected = "/** \n * @author John Doe <john@example.com> \n * @license MIT \n * @package MyPackage \n * / " ;
102+ $ expected = "/** \n * @author John Doe <john@example.com> \n * @license MIT \n */ " ;
104103 self ::assertSame ($ expected , $ result );
105104 }
106105
You can’t perform that action at this time.
0 commit comments