Download the PHP package wataridori/framgia-php-codesniffer without Composer
On this page you can find all versions of the php package wataridori/framgia-php-codesniffer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wataridori/framgia-php-codesniffer
More information about wataridori/framgia-php-codesniffer
Files in wataridori/framgia-php-codesniffer
Package framgia-php-codesniffer
Short Description Framgia PHP Standards Checker by PHP CodeSniffer
License MIT
Informations about the package framgia-php-codesniffer
Framgia PHP Standards Checker by PHP CodeSniffer
About
- PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
- Framgia PHP Standard is a set of coding conventions used by PHP team in Framgia Vietnam. It is based on the PSR-2 Coding Style Guide with some additional rules.
- This is the Coding Standard package for Code Sniffer to check whether your codes satisfy the Framgia Standard or not.
- New: This standard is compatible with both PHP CodeSniffer version 2 and 3. If you are using PHP CodeSniffer 2, please use the codes in
0.2
branch. If you are using PHP CodeSniffer 3, use the codes inmaster
branch.
Install
Install locally
You can install in each project folder:
phpcs
command will be installed to folder vendor/bin
.
Now you can check and run phpcs:
Install globally
-
Install
PHP_CodeSniffer
globally bycomposer
. Make sure you have~/.composer/vendor/bin/
in yourPATH
. -
Clone this repository
- Add its path to the PHP_CodeSniffer configuration:
NOTE: If you want to set multiple installed_paths, you can get old paths by command:
Then you can set multiple paths by command:
-
Check whether the Framgia Standard has been installed succesfully or not
-
Check your code using Framgia Standard
-
If you do not want to install this package inside CodeSniffer Standards folder, you can clone it to everywhere you want and specify the installed folder when you run
phpcs
command. - It's a pity that the default encoding used by PHP_CodeSniffer is ISO-8859-1. Yes, it is not UTF-8.
Therefore, you will have some problems with the words counter if you use Japanese in your codes.
You'd better change the default encoding to
UTF-8
.
Or set the encoding to UTF-8
when running the command.