Added tests for checking extra semicolon appended after the closing brace before a closing PHP tag.
Updated fix method to check for closing brace before inserting semicolon.
Fixed a few PSR2 code style warnings
bug #625 Extra semicolon is appended after the closing brace that happens to be at EOF with a PHP closing tag (jian-wu)

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

Discussion
----------

Extra semicolon is appended after the closing brace that happens to be at EOF with a PHP closing tag

Hi @fabpot and @keradus,

I added 3 more cases to the provideCasesWithFullOpenTag test to show that an extra semicolon is appended after the closing brace if that happens to be at EOF with a PHP closing tag.

If these cases are not appropriate to be in this test, I'll be more than happy to move them to a new test.

This is in regards to issues #294. #455.

I will patch up this PR with the fix if this is deemed valid and worthy.

Thanks.

Commits
-------

f5c325c Added tests for checking extra semicolon appended after the closing brace before a closing PHP tag. Updated fix method to check for closing brace before inserting semicolon.
minor #629 Fixed a few PSR2 code style warnings (jian-wu)

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

Discussion
----------

Fixed a few PSR2 code style warnings

@keradus I fixed a few PSR2 violations in BracerFixer and BracerFixerTest classes.

Commits
-------

6cba728 Fixed a few PSR2 code style warnings
Added check to see if endIndex token is comment and append EOL if it is
bug #632 Fix broken handling of trailing comment inside array in MultilineArrayTrailingCommaFixer (jian-wu)

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

Discussion
----------

Fix broken handling of trailing comment inside array in MultilineArrayTrailingCommaFixer

This is to fix #630

Commits
-------

72da102 Added check to see if endIndex token is comment and append EOL if it is
Lint code before save into file
feature #631 Lint code before save into file (keradus)

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

Discussion
----------

Lint code before save into file

Lint code before save into file.

resolve #609

Commits
-------

324faf9 Lint code before save into file
allow to disable code linting in config file
minor #634 allow to disable code linting in config file (keradus)

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

Discussion
----------

allow to disable code linting in config file

allow to disable code linting in config file

related with #631

//cc @sstok

Commits
-------

0a29f1e allow to disable code linting in config file
Add transformer: DynamicPropBrace
Fix possibility to disable Linter
Fixer::fixFile - improve speed by changing order of linting and caching
bug #643 Fix possibility to disable Linter (keradus)

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

Discussion
----------

Fix possibility to disable Linter

Commits
-------

90a18d7 Fix possibility to disable Linter
minor #644 Fixer::fixFile - improve speed by changing order of linting and caching (keradus)

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

Discussion
----------

Fixer::fixFile - improve speed by changing order of linting and caching

If all files is already in cache and do not need a fixing then linting tooks 90% time. No need to.

Commits
-------

442f59a Fixer::fixFile - improve speed by changing order of linting and caching
minor #640 Add transformer: DynamicPropBrace (keradus)

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

Discussion
----------

Add transformer: DynamicPropBrace

Resolves #587

Commits
-------

0635d7b Add transformer: DynamicPropBrace
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