Fix cache when installed by composer - follow symlink if env doesn't do it automatically
bug #650 Fix cache when installed by composer (keradus)

This PR was merged into the 1.0.x-dev branch.

Discussion
----------

Fix cache when installed by composer

Fix cache when installed by composer - follow symlink if env doesn't do it automatically

Duplicate #649 but with correct commit author

Commits
-------

2ca3321 Fix cache when installed by composer - follow symlink if env doesn't do it automatically
implemented YodaConditions fixer
feature #611 implemented YodaConditions fixer (bgotink)

This PR was squashed before being merged into the 1.0.x-dev branch (closes #611).

Discussion
----------

implemented YodaConditions fixer

See #598.

I know the code is missing comments, but I wanted feedback on the code first.

Modus operandi:

The documentation on operator precedence ([here][precedense_doc]) shows PHP has two different levels of comparison:
- `<`, `<=`, `>`, `>=`
- `==`, `!=`, `===`, `!==`, `<>`
The latter of the two has a lower precedence.

The fixer does the following for both kinds of comparison, with the higher precedence coming first:
- iterate backwards over the tokens until a comparison is found
  - find the left-hand side and right-hand side of the comparison
  - run the entire process over both left-hand and right-hand sides
  - if the left-hand isn't a "simple" expression and the right-hand is, switch sides
  - skip all tokens that were part of this comparison

It looks for the left-hand and right-hand sides by going backward/forward starting at the comparison itself, using:
- define `$level` as the level of parentheses the current token is in, with the comparison token being at `0`
- if `$level` is below zero, we've found the end
- if `$level` isn't zero, we haven't found the end
- if the current token has a lower precedence, we've found the end
- if  the current token is a `,` or `;`, we've found the end
- if the current token is a keyword like `return`, `case`, `throw`, `goto`, we've found the end

Deciding whether or not a side is "simple" is currently implemented as checking whether the side is an integer (`T_LNUMBER`), a floating point number (`T_DNUMBER`), a string( `T_CONSTANT_ENCAPSED_STRING`) or any keyword (`T_STRING`).

[precedense_doc]: http://php.net/manual/en/language.operators.precedence.php

Commits
-------

56923af implemented YodaConditions fixer
Also fix whitespace at beginning of lines of docblocks
bug #638 Also fix whitespace at beginning of lines of docblocks (hannesvdvreken)

This PR was squashed before being merged into the 1.0.x-dev branch (closes #638).

Discussion
----------

Also fix whitespace at beginning of lines of docblocks

#350

Commits
-------

6608f03 Also fix whitespace at beginning of lines of docblocks
Tokens - fix docs
minor #651 Tokens - fix docs (keradus)

This PR was merged into the 1.0.x-dev branch.

Discussion
----------

Tokens - fix docs

Commits
-------

c48c178 Tokens - fix docs
Merge branch 'master' of git://github.com/fabpot/PHP-CS-Fixer