Skip to content

Commit 86ac99b

Browse files
authored
Create README.md
1 parent ad00c85 commit 86ac99b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# php-cs-fixer-phpdoc-force-fqcn
2+
3+
[php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) rule to force using FQCN (Fully-Qualified Class Name) in DocBlock comments.
4+
5+
## Usage
6+
7+
In your .php_cs file:
8+
9+
```php
10+
<?php
11+
12+
// PHP-CS-Fixer 2.x syntax
13+
return PhpCsFixer\Config::create()
14+
// (1) Register \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer fixer
15+
->registerCustomFixers([
16+
new \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer()
17+
])
18+
->setRules([
19+
// ...
20+
// (2) Enable AdamWojs/phpdoc_force_fqcn_fixer rule
21+
'AdamWojs/phpdoc_force_fqcn_fixer' => true,
22+
])
23+
// ...
24+
;
25+
```

0 commit comments

Comments
 (0)