Download the PHP package biaoqianwo/yii2-coding-standards without Composer
On this page you can find all versions of the php package biaoqianwo/yii2-coding-standards. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download biaoqianwo/yii2-coding-standards
More information about biaoqianwo/yii2-coding-standards
Files in biaoqianwo/yii2-coding-standards
Package yii2-coding-standards
Short Description Yii PHP Framework Version 2 - Coding standard tools
License BSD-3-Clause
Homepage http://www.yiiframework.com/
Informations about the package yii2-coding-standards
Yii 2 Web Framework Coding Standard
This repository contains settings for Yii2 coding style for various tools.
Getting code
PHP_Codesniffer
PHP_CodeSniffer coding standard, rule set and sniff token parsing classes for the Yii 2 Web Framework. Overally rules are based on PSR-2 standard with some minor exceptions and changes. Rules derived from PSR-2 standard and excluded in Yii2 standard were implemented (or planned to be) as sniff classes.
Rules could also be used for checking code style of an existing Yii2 applications.
Everything that is merged into main Yii2 development repository being checked with these rule set as well.
Using code style
After CodeSniffer is installed you can launch it with custom code style using the following syntax:
If you're using PhpStorm you can configure it to use CodeSniffer using Settings → PHP → Code Sniffer. Yii2 code style can be specified at Inspections → PHP → PHP Code Sniffer validation.
PhpStorm
Yii uses PSR-1 and PSR-2 as code style standards. You can choose these via Settings
→ Code Style
→ PHP
→ Set from...
→ Predefined Style
→ PSR1/PSR2
.