mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-05 13:37:25 +02:00
Merge pull request #556 from ThaDafinser/patch-2
php-cs-fixer + ZF1 CS update
This commit is contained in:
@@ -24,17 +24,13 @@ applications that implement the components can have consistency even when workin
|
|||||||
* [Read about PSR-2][psr2]
|
* [Read about PSR-2][psr2]
|
||||||
* [Read about PSR-4][psr4]
|
* [Read about PSR-4][psr4]
|
||||||
* [Read about PEAR Coding Standards][pear-cs]
|
* [Read about PEAR Coding Standards][pear-cs]
|
||||||
* [Read about Zend Coding Standards][zend-cs]
|
|
||||||
* [Read about Symfony Coding Standards][symfony-cs]
|
* [Read about Symfony Coding Standards][symfony-cs]
|
||||||
|
|
||||||
You can use [PHP_CodeSniffer][phpcs] to check code against any one of these recommendations, and plugins for text
|
You can use [PHP_CodeSniffer][phpcs] to check code against any one of these recommendations, and plugins for text
|
||||||
editors like [Sublime Text 2][st-cs] to be given real time feedback.
|
editors like [Sublime Text 2][st-cs] to be given real time feedback.
|
||||||
|
|
||||||
You can fix the code layout automatically by using one of the two possible tools. One is Fabien Potencier's
|
You can fix the code layout automatically by using one of the two following tools. One is the [PHP Coding Standards Fixer][phpcsfixer] which has a very well tested codebase.
|
||||||
[PHP Coding Standards Fixer][phpcsfixer] which has a very well tested codebase. It is bigger and slower, but very
|
Another option is [php.tools][phptools], which is made popular by the [sublime-phpfmt][sublime-phpfmt] editor plugin. While being newer, it makes great improvements in performance, meaning real-time editor fixing is more fluid.
|
||||||
stable and used by some huge projects like Magento and Symfony. Another option is [php.tools][phptools], which is made
|
|
||||||
popular by the [sublime-phpfmt][sublime-phpfmt] editor plugin. While being newer, it makes great improvements in
|
|
||||||
performance, meaning real-time editor fixing is more fluid.
|
|
||||||
|
|
||||||
English is preferred for all symbol names and code infrastructure. Comments may be written in any language easily
|
English is preferred for all symbol names and code infrastructure. Comments may be written in any language easily
|
||||||
readable by all current and future parties who may be working on the codebase.
|
readable by all current and future parties who may be working on the codebase.
|
||||||
@@ -46,7 +42,6 @@ readable by all current and future parties who may be working on the codebase.
|
|||||||
[psr2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
|
[psr2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
|
||||||
[psr4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
|
[psr4]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
|
||||||
[pear-cs]: http://pear.php.net/manual/en/standards.php
|
[pear-cs]: http://pear.php.net/manual/en/standards.php
|
||||||
[zend-cs]: http://framework.zend.com/manual/1.12/en/coding-standard.html
|
|
||||||
[symfony-cs]: http://symfony.com/doc/current/contributing/code/standards.html
|
[symfony-cs]: http://symfony.com/doc/current/contributing/code/standards.html
|
||||||
[phpcs]: http://pear.php.net/package/PHP_CodeSniffer/
|
[phpcs]: http://pear.php.net/package/PHP_CodeSniffer/
|
||||||
[st-cs]: https://github.com/benmatselby/sublime-phpcs
|
[st-cs]: https://github.com/benmatselby/sublime-phpcs
|
||||||
|
Reference in New Issue
Block a user