Skip to content

Commit b8f9267

Browse files
committed
Improve README
- Use shield.io for better image - Remove broken link - Explain the doctrine team standards
1 parent 50ef313 commit b8f9267

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
Doctrine PHP_CodeSniffer Coding Standard
22
========================================
33

4-
[![Build Status](https://secure.travis-ci.org/doctrine/coding-standard.png?branch=master)](http://travis-ci.org/doctrine/coding-standard)
5-
[![Coverage Status](https://coveralls.io/repos/doctrine/coding-standard/badge.png?branch=master)](https://coveralls.io/r/doctrine/coding-standard?branch=master)
4+
[![Build Status](https://img.shields.io/travis/doctrine/coding-standard/master.svg?style=flat-square)](http://travis-ci.org/doctrine/coding-standard)
5+
[![Total Downloads](https://img.shields.io/packagist/dt/doctrine/coding-standard.svg?style=flat-square)](https://packagist.org/packages/doctrine/coding-standard)
6+
[![Latest Stable Version](https://img.shields.io/packagist/v/doctrine/coding-standard.svg?style=flat-square)](https://packagist.org/packages/doctrine/coding-standard)
67

7-
The [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) Coding Standard to check against the [Doctrine Coding Standard](https://github.com/deeky666/doctrine-coding-standard/blob/master/Docs/README.md).
8+
9+
The [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) ruleset to check that repositories are
10+
following the standards defined by the our team.
11+
12+
Standards
13+
---------
14+
15+
We use [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
16+
and [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) with some
17+
exceptions/differences (:white_check_mark: are the implemented sniffs):
18+
19+
- Keep the nesting of control structures per method as small as possible
20+
- Add spaces between assignment, control and return statements
21+
- Prefer early exit over nesting conditions
22+
- :white_check_mark: Align equals (=) signs
23+
- :white_check_mark: Add spaces around a concatenation operator `$foo = 'Hello ' . 'World!';`
24+
- :white_check_mark: Add spaces around a negation if condition `if ( ! $cond)`
25+
- :white_check_mark: Add spaces around a return type declaration `function () : void {}`
26+
- :white_check_mark: Add spaces after a type cast `$foo = (int) '12345';`
827

928
Installation
1029
------------

0 commit comments

Comments
 (0)