Skip to content
PHP hard mode
Branch: master
Clone or download
Latest commit e7131f4 Feb 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
HardMode Do not align comments Feb 20, 2019
.gitignore First commit Feb 20, 2019
LICENSE First commit Feb 20, 2019 Update Feb 26, 2019
composer.json Set the type so that it works with… Feb 20, 2019


composer require --dev mnapoli/hard-mode

Then write a .phpcs.xml.dist file:

<?xml version="1.0"?>
    <arg name="basepath" value="."/>


    <rule ref="HardMode"/>

Then run the analysis:


Or using pretty:


Fixing errors



Or using pretty:

vendor/bin/pretty fix

Advanced configuration

Check out the PHP CodeSniffer documentation for all the options. You will find below documentation for common scenarios.

To exclude some files from the analysis:


On large projects you may want to use PHP CodeSniffer's cache:

<arg name="cache" value=".phpcs-cache"/>

Remember to add .phpcs-cache to .gitignore.

You can’t perform that action at this time.