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

Maintainers

Package info

github.com/DutchCodingCompany/php-cs-fixer-phpdoc-force-fqcn

pkg:composer/dutchcodingcompany/php-cs-fixer-phpdoc-force-fqcn

Statistics

Installs: 28

Dependents: 0

Suggesters: 0

Stars: 0

v2.0.1 2026-05-27 09:38 UTC

This package is auto-updated.

Last update: 2026-05-27 09:40:57 UTC


README

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

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

Installation

You can install the package via composer:

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

Usage

In your .php-cs-fixer.php 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,
    ])
    // ...
    ;