PHP Code Sniffer rules that cover a large part of the [Fuel PHP coding standards] (http://docs.fuelphp.com/general/coding_standards.html "Fuel PHP Coding Standards").
run composer require --dev eviweb/fuelphp-phpcs:~1
in your fuelphp project.
It will automatically install PHP CodeSniffer using composer.
- clone the project
git clone https://github.com/eviweb/fuelphp-phpcs.git
- change directory to ./fuelphp-phpcs
cd fuelphp-phpcs
- run installer with root privileges
sudo ./install.sh
- change directory to ./fuelphp-phpcs
cd fuelphp-phpcs
- run uninstaller with root privileges
sudo ./uninstall.sh
Assuming FuelPHPCS was installed inside ./fuel/vendor
using composer and the bin-dir
is ./fuel/vendor/bin
.
Run ./fuel/vendor/bin/fuelphpcs PROJECT_TO_SNIFF_DIRECTORY
where
PROJECT_TO_SNIFF_DIRECTORY is your fuel php project directory.
run phpcs --standard=FuelPHP PROJECT_TO_SNIFF_DIRECTORY
where
PROJECT_TO_SNIFF_DIRECTORY is your fuel php project directory.
BE AWARE not to use --tab-width phpcs option with another value than 0, this would disable tabs recognition !
Please note that this package works with PHP Code Sniffer version 2.9.x.