lukzgois / laravelcs by lukz
forked from antonioribeiro/laravelcs

PHP_CodeSniffer custom Sniff for Laravel coding standard
267
0
3
Package Data
Maintainer Username: lukz
Maintainer Contact: lucaspgois@gmail.com (Lucas Padilha Gois)
Package Create Date: 2015-04-30
Package Last Update: 2015-05-06
Language: PHP
License: BSD-3-Clause
Last Refreshed: 2024-11-09 03:01:42
Package Statistics
Total Downloads: 267
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

Laravel PHP_CodeSniffer

This is a custom Sniff to detect violations and reformat PHP source code based on Laravel Coding Standard.

This is a fork from the Antonio Ribeiro's Project, which can be found here.

It checks the same thing to the Antonio's original project, in additional this sniffer allows inline control structures and check the functions have docblocks.

Your source code will be checked for PSR-1 & the Laravel "flavor" of PSR-2.

###Usage wih git

Clone this repository

git clone http://github.com/lukzgois/laravelcs LaravelCodeSniffer

Execute CodeSniffer

phpcs --standard=LaravelCodeSniffer/Standards/Laravel/  /path/to/your/project/files

###Usage with Composer

The recommended way is to install it globally with the following command:

composer global require lukzgois/laravelcs

Make sure you have ~/.composer/vendor/bin/ in your PATH.

You will then be able to run PHP Code Sniffer with the Laravel Standard:

phpcs --standard=$HOME/.composer/vendor/lukzgois/laravelcs/Standards/Laravel/ /path/to/your/project/files

###Contributing

There are probably still a lot to do here, so please, open issues and send pull requests.