Download the PHP package flaconi/coding-standard without Composer
On this page you can find all versions of the php package flaconi/coding-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flaconi/coding-standard
More information about flaconi/coding-standard
Files in flaconi/coding-standard
Package coding-standard
Short Description Flaconi Coding Standard for PHP_CodeSniffer
License MIT
Informations about the package coding-standard
Flaconi Coding Standard
Flaconi Coding Standard for PHP_CodeSniffer provides sniffs that fall for now in one category:
- Test - improving the code style of phpunit test cases
Table of contents
- Sniffs included in this standard
- Test - improving the code style of phpunit test cases
- Installation
- How to run the sniffs
- Choose which sniffs to run
- Using all sniffs from the standard
- Fixing errors automatically
- Suppressing sniffs locally
- Contributing
Sniffs included in this standard
🔧 = Automatic errors fixing
Test - improving the code style of phpunit test cases
FlaconiCodingStandard.Test.UseMethodPrefixInTestcase 🔧
- Checks for
@test
and force to usetest
Prefix
FlaconiCodingStandard.Test.UseStaticCallsForAssertInTestcase 🔧
Reports usage of non static assert method class
Installation
The recommended way to install Flaconi Coding Standard is through Composer.
How to run the sniffs
You can choose one of two ways to run only selected sniffs from the standard on your codebase:
Choose which sniffs to run
Mention Flaconi Coding Standard in your project's ruleset.xml
:
When running phpcs
on the command line, use the --sniffs
option to list all the sniffs you want to use separated by a comma:
Or write your own ruleset.xml by referencing the selected sniffs. This is a sample ruleset.xml:
Then run the phpcs
executable the usual way:
Fixing errors automatically
Sniffs in this standard marked by the 🔧 symbol support automatic fixing of coding standard violations. To fix your code automatically, run phpcbf instead of phpcs:
Always remember to back up your code before performing automatic fixes and check the results with your own eyes as the automatic fixer can sometimes produce unwanted results.
Contributing
To make this repository work on your machine, clone it and run these two commands in the root directory of the repository:
After writing some code and editing or adding unit tests, run phing again to check that everything is OK:
We are always looking forward for your bugreports, feature requests and pull requests. Thank you.
All versions of coding-standard with dependencies
escapestudios/symfony2-coding-standard Version ^3.11
squizlabs/php_codesniffer Version ^3.3
slevomat/coding-standard Version ^7.0
dealerdirect/phpcodesniffer-composer-installer Version ^0.7.0
doctrine/coding-standard Version ^9.0