Download the PHP package chefsplate/sniffer-rules without Composer
On this page you can find all versions of the php package chefsplate/sniffer-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chefsplate/sniffer-rules
More information about chefsplate/sniffer-rules
Files in chefsplate/sniffer-rules
Package sniffer-rules
Short Description A Laravel 4 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.
License MIT
Homepage https://github.com/chefsplate/sniffer-rules
Informations about the package sniffer-rules
phpcs 2.0+ Laravel 4/5 Command
This is a Laravel 4/5 package that hooks up SquizLabs CodeSniffer 2 into Laravel-based apps. It can also be used manually, so read on.
Detect violations of a defined coding standard. It helps your code remain clean and consistent. Available options are: PSR2, PSR1, Zend, PEAR, Squiz, PHPCS and ChefsPlate.
Setup
Require this package in composer:
Laravel 4/5
In your config/app.php
add ChefsPlate\SnifferRules\ServiceProvider:class
to $providers
array:
Laravel 5: Publish the configuration file
Laravel 4: Manually create config
Copy config to
app/config/sniffer-rules.php
Edit configuration file config/sniffer-rules.php
to tweak the sniffer behavior.
Manual
Install our Standard by configuring PHP_CodeSniffer to look for it.
Usage
Laravel
To run the sniffer in a CI environment, the -n
option should be set to remove
interaction:
Manual
It's encouraged to add a Makefile
to your project that makes it
trivial for other developers. Use Makefile
in this directory and adjust as
needed to fit your project requirements.
ChefsPlate Coding Standards
Coding standards
Addendum and Clarifications
namespace
should be on the same line as opening php tag. e.g.:<?php namespace ChefsPlate\Amazing
- Property names should be snake_case
- Test names should use underscores, not camelCase. e.g.:
test_cats_love_catnip
License
MIT
All versions of sniffer-rules with dependencies
illuminate/support Version ~4.0|~5.0
illuminate/console Version ~4.0|~5.0
squizlabs/php_codesniffer Version 2.*