Download the PHP package fattureincloud/php-code-standard without Composer
On this page you can find all versions of the php package fattureincloud/php-code-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fattureincloud/php-code-standard
More information about fattureincloud/php-code-standard
Files in fattureincloud/php-code-standard
Package php-code-standard
Short Description PHP CS Fixer coding standard, extended from @PhpCsFixer.
License MIT
Informations about the package php-code-standard
php-coding-standard
PHP CS Fixer coding standard, extended from @PhpCsFixer.
Prerequisites
You need to install PHP CS Fixer installed locally in the project and husky + lint-staged configured in order to make all of this working properly.
Install PHP CS Fixer
Install husky + lint-staged
Create a package.json
like this one:
Run npm install
.
Add these lines to composer.json
:
Finally, remember to add node_modules/
to .gitignore
.
Installation and usage
Add lint-staged action
Put this line as lint-staged action in package.json
in order to execute PHP CS Fixer on all the staged files at commit time.
Add composer script (optional)
Add the following line under composer.json
scripts property.
PHPStorm
Enable inspections
- Search for "PHP CS Fixer" under Quality Tools
- Add a local configuration with path
$PROJECT_DIR$/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
- Search for "PHP CS Fixer validation" under Inspections
- Flag "Allow ricky rules"
- Select Custom ruleset
- Click on the 3 dots and enter
<your-project-directory>/vendor/fattureincloud/php-code-standard/.php-cs-fixer.php
Configure file watcher
Create a file watcher with the following values:
De-flag all the advanced options.
Configure external tool (optional)
Create an external tool with the following values:
Flag Synchronize files after execution
and Open console for tool output
.
VSCode
TODO