PHP Code Sniffer VS PHP-CS-Fixer

Compare PHP Code Sniffer vs PHP-CS-Fixer and see what are their differences.

PHP Code Sniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. (by squizlabs)

PHP-CS-Fixer

A tool to automatically fix PHP Coding Standards issues [Moved to: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer] (by FriendsOfPHP)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
PHP Code Sniffer PHP-CS-Fixer
47 3
10,603 11,621
0.3% -
6.8 10.0
28 days ago over 1 year ago
PHP PHP
BSD 3-clause "New" or "Revised" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

PHP Code Sniffer

Posts with mentions or reviews of PHP Code Sniffer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-08.

PHP-CS-Fixer

Posts with mentions or reviews of PHP-CS-Fixer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-08.
  • Laravel code-quality tools
    16 projects | dev.to | 8 Feb 2024
    If you don't want to use any of those presets, your only option is to specify the all the rules by hand. Pint is built on top of PHP CS Fixer so you can use all the rules that it has. You can use the PHP-CS-Fixer configurator to cherry-pick your own set of rules.
  • 💅 Automatically Format PHP Code
    2 projects | dev.to | 11 Apr 2023
    1.1. Install the package php-cs-fixer
  • how can I know if I am following PSR standards
    2 projects | /r/PHP | 6 Jan 2023
    But I think in most cases they just mean follow the Coding Standard, Which still can be PSR-1, PSR-12 or the new PER Coding Standard. In this case I just recommend your company to add php-cs-fixer to the codebase to apply coding standards rules you want to follow. Good it it does not just lint it it will already fix it.

What are some alternatives?

When comparing PHP Code Sniffer and PHP-CS-Fixer you can also consider the following projects:

PHP CS Fixer - A tool to automatically fix PHP Coding Standards issues

tlint - Tighten linter for Laravel conventions.

PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!

coding-standard - Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs

PHP Mess Detector - PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

PHP Parser - A PHP parser written in PHP

phan - Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

food-order-gh-action-test

Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

laravel-code-style - Automatic code formatting for Laravel projects

GrumPHP - A PHP code-quality tool

husky-php - Git hooks made easy!! 🎉PHP is combined with composer to implement functionality similar to js's NPM module husky