Download the PHP package fnayou/standards without Composer
On this page you can find all versions of the php package fnayou/standards. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fnayou/standards
More information about fnayou/standards
Files in fnayou/standards
Package standards
Short Description PHP Code Sniffer configurator.
License MIT
Homepage https://github.com/fnayou/standards
Informations about the package standards
Standards
Clear and easy to use PHP Code Sniffer configurator.
Work with symfony, laravel, yii and any PHP based projects.
- Installation
- Usage
- Using .standards configuration file
- Running command with arguments
- With Symfony
- With Laravel
- With Yii
- Composer script
Installation
via composer
and for dev :
by default, you can run command from vendor/bin/standards
, but you can add :
and you can run command from bin/standards
.
note that you can install globally :
Usage
Using .standards configuration file
all you have to do is to create a dot file named .standards
in which we will have all our parameters :
now all you have to do is to run command bin\standards
.
note :
- all ignored files or directory should be prefixed with
!
like!test/
or!test.php
- all ignored and allowed files/directories should be written one by line like
Running command with arguments
you can run command with phpcs arguments :
note that this use will override configuration using
.standards
file if used.
With Symfony
you have to install via composer
:
and next, create your .standards
file :
now, all you have to do is to run command bin\standards
.
With Laravel
you have to install via composer
:
and next, create your .standards
file :
now, all you have to do is to run command bin\standards
.
With Yii
you have to install via composer
:
and next, create your .standards
file :
now, all you have to do is to run command bin\standards
.
Composer script
you can also add a composer script to run command
next all you have to do is to run script (can be useful with capistrano
or/and jenkins
)
Credits
- Aymen FNAYOU - GitHub
- Fork from the awesome M6Web Coke so thanks ;)
Notes
I have forked the wonderful M6Web Coke because the company where I'm working find that coke and sniff is not so conventional :( and they refused to used it. And honestly I don't like blue in the output :P
Todo
- generate
.standards
file - handle different path for command (
phpcs
installed globally)