PHPCS libraries and configuration for Laravel
onramplab/onr-phpcs-laravel is a Laravel package for phpcs libraries and configuration for laravel.
It currently has 0 GitHub stars and 35.591 downloads on Packagist (latest version v1.2.0).
Install it with composer require onramplab/onr-phpcs-laravel.
Discover more Laravel packages by onramplab
or browse all Laravel packages to compare alternatives.
Last updated
We use this package to set up a consistent PHPCS configuration across my Laravel projects. The ruleset is based on @emielmolenaar ruleset.
If you wish to use this configuration in your project, install it using composer:
composer require --dev onramplab/onr-phpcs-laravel
Afterwards, run php vendor/bin/phpcs -i to verify that onr-phpcs-laravel is listed as an installed ruleset.
You may now use the ruleset like so:
php vendor/bin/phpcs --standard=onr-phpcs-laravel app/
Or you can create a phpcs.xml file in your root folder with following example:
<?xml version="1.0"?>
<ruleset name="Onramplab Laravel Standards">
<description>The Laravel Coding Standards</description>
<rule ref="onr-phpcs-laravel"/>
<file>app</file>
<file>config</file>
<file>public</file>
<file>resources</file>
<file>routes</file>
<file>tests</file>
</ruleset>
Contributions welcome.