PHPackages                             moddit/phpcs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. moddit/phpcs

ActivePhpcodesniffer-standard[PSR &amp; Standards](/categories/psr-standards)

moddit/phpcs
============

Moddit PHP CS Rules

1.0.3(1y ago)019MIT

Since Jan 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/moddit/phpcs)[ Packagist](https://packagist.org/packages/moddit/phpcs)[ RSS](/packages/moddit-phpcs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHP CodeSniffer Project
=======================

[](#php-codesniffer-project)

This project uses PHP\_CodeSniffer to ensure that your PHP code adheres to a set of coding standards.

Requirements
------------

[](#requirements)

- PHP 8.0 or higher
- Composer

Installation
------------

[](#installation)

1. Install PHP\_CodeSniffer via Composer globally:

    ```
    composer global require squizlabs/php_codesniffer
    ```
2. Verify the installation:

    ```
    phpcs --version
    ```
3. Show the current PHP CodeSniffer ruleset:

    ```
    phpcs --config-show
    ```
4. Set the moddit/phpcs as your global PHP CodeSniffer:

    ```
    composer global require moddit/phpcs # Installing this package rule set
    phpcs --config-set default_standard ModditPHPCS # Updating default standard ruleset
    ```

Project ruleset
---------------

[](#project-ruleset)

Your project needs a phpcs.xml file to instantly know which ruleset and folder to lint/format. Create or update the phpcs.xml file in the root of the project as follows. Don't forget to edit the project name and set the files to lint/format:

```

    app
    wp/wp-content/themes/blue-headless/includes

```

Usage
-----

[](#usage)

To check the PHP files in your project, run the following command from your global Composer packages:

```
phpcs
```

Or if the project has no phpcs.xml file in the root folder, specify the folder to lint:

```
phpcs ./path/to/php
```

Fixing Code
-----------

[](#fixing-code)

PHP\_CodeSniffer also includes a tool to automatically fix coding standard violations. To use it, run:

```
phpcbf ./path/to/your/php/files
```

Or fix all folder files configured in the ruleset of the project's phpcs.xml:

```
phpcbf
```

IDEA Extensions
---------------

[](#idea-extensions)

### Visual Studio Code

[](#visual-studio-code)

To show `phpcs.xml` lint errors in Visual Studio Code, you can use the following extensions:

- **PHP CodeSniffer**: This extension integrates PHP\_CodeSniffer with Visual Studio Code. Including linting and error fixing based on `phpcs.xml````
    ext install shevaua.phpcs
    ```

### PhpStorm

[](#phpstorm)

To show `phpcs.xml` lint errors in PhpStorm, you can configure the built-in PHP CodeSniffer integration:

For more detailed instructions, refer to the [PhpStorm documentation](https://www.jetbrains.com/help/phpstorm/using-php-code-sniffer.html#configure-tool-options).

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance41

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c2c4d82137501d1bbba82a59b3eac85bee1ff626eaaa79ebf800ccf64506f04?d=identicon)[tijmen.dejong](/maintainers/tijmen.dejong)

---

Top Contributors

[![tijmenmoddit](https://avatars.githubusercontent.com/u/98964813?v=4)](https://github.com/tijmenmoddit "tijmenmoddit (16 commits)")

### Embed Badge

![Health badge](/badges/moddit-phpcs/health.svg)

```
[![Health](https://phpackages.com/badges/moddit-phpcs/health.svg)](https://phpackages.com/packages/moddit-phpcs)
```

###  Alternatives

[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[stella-maris/clock

A pre-release of the proposed PSR-20 Clock-Interface

7947.5M2](/packages/stella-maris-clock)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[inpsyde/modularity

Modular PSR-11 implementation for WordPress plugins, themes or libraries.

54383.3k3](/packages/inpsyde-modularity)[php-standard-library/phpstan-extension

PHPStan PSL extension

201.2M13](/packages/php-standard-library-phpstan-extension)[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
