Skip to content

adamwojs/php-cs-fixer-phpdoc-force-fqcn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-cs-fixer-phpdoc-force-fqcn

php-cs-fixer rule to force using FQCN (Fully-Qualified Class Name) in DocBlock comments.

Installation

You can install the package via composer:

composer require --dev adamwojs/php-cs-fixer-phpdoc-force-fqcn

Usage

In your .php_cs file:

<?php

// PHP-CS-Fixer 2.x syntax
return PhpCsFixer\Config::create()
    // (1) Register \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer fixer
    ->registerCustomFixers([
        new \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer()
    ])
    ->setRules([
        // ... 
        // (2) Enable AdamWojs/phpdoc_force_fqcn_fixer rule
        'AdamWojs/phpdoc_force_fqcn_fixer' => true,
    ])
    // ...
    ;

About

php-cs-fixer rule to force using FQCN in DocBlock comments

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages