BracesFixer
feature #472 BracesFixer (keradus)

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

Discussion
----------

BracesFixer

Braces for structure blocks, fix #98

- [x] add missing braces
- [x] correct single-level intend
- [X] correct multi-level intend
- [X] fix `T_FOR` token syntax
- [X] ignore T_END* syntax
- [X] make Travis pass
- [X] fix #168 -> fixed in PR #488
- [X] fix #374
- [X] remove new line between `}` and T_ELSE, E_ELSEIF, T_CATCH
- [X] detect duplicated functionality in CurlyBracketsNewlineFixer
- [X] detect duplicated functionality in ControlSpacesFixer

Commits
-------

5f3a1fd BracesFixer
Tokens - little DRY, use Token::equalsAny
change ALL_LEVEL to SYMFONY_LEVEL
minor #535 change ALL_LEVEL to SYMFONY_LEVEL (keradus)

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

Discussion
----------

change ALL_LEVEL to SYMFONY_LEVEL

Resolve #464

Commits
-------

a05f4c9 change ALL_LEVEL to SYMFONY_LEVEL
BracesFixer - fix #540
improve OrderUseStatementsFixer parsing logic

- Sort only the actual namespaces and not complete lines
- Use correct sorting when using multiple namespace blocks
- Detect traits correctly
- Preserve original white space
bug #518 improve OrderUseStatementsFixer parsing logic (sstok)

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

Discussion
----------

improve OrderUseStatementsFixer parsing logic

|Q            |A   |
|---          |--- |
|Bug Fix?     |yes |
|New Feature? |n   |
|BC Breaks?   |n   |
|Deprecations?|n   |
|Tests Pass?  |yes |
|Fixed Tickets|#499|
|License      |MIT |

- Sort only the actual namespaces and not complete lines
- Detect traits correctly
- Preserve original white space

Todo:

- [x] Resolve Tokens cache bug
- [x] Add some tests with multiple namespaces
- [x] Fix comments being moved to the wrong position

Commits
-------

8a5b724 improve OrderUseStatementsFixer parsing logic
safer curly braces checking
minor #538 safer curly braces checking (keradus)

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

Discussion
----------

safer curly braces checking

- Safer check if token is { or }
- little speed impr. in `Tokens::getNamespaceUseIndexes`

Commits
-------

062b933 safer curly braces checking
minor #539 Tokens - little DRY, use Token::equalsAny (keradus)

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

Discussion
----------

Tokens - little DRY, use Token::equalsAny

Commits
-------

71216d7 Tokens - little DRY, use Token::equalsAny
bug #541 BracesFixer - fix #540 (keradus)

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

Discussion
----------

BracesFixer - fix #540

Commits
-------

b433d62 BracesFixer - fix #540
use UNIX-style line endings
minor #546 Set UNIX line ending in .editorconfig (bgotink)

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

Discussion
----------

Set UNIX line ending in .editorconfig

This PR changes the line ending requested in .editorconfig to the linefeed character, as required by PSR-2.

Commits
-------

63d6573 use UNIX-style line endings
Tokens::insertAt - fix param name
minor #551 Tokens::insertAt - fix param name (keradus)

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

Discussion
----------

Tokens::insertAt - fix param name

Commits
-------

60d6ebb Tokens::insertAt - fix param name
Psr0Fixer to tokens
bug #545 Psr0Fixer to tokens (bgotink)

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

Discussion
----------

Psr0Fixer to tokens

I've rewritten the Psr0Fixer to use tokens instead of raw string, and I've added a leading `<?php` to all test-cases to make `token_get_all` work.

There's one test that fails though: the leading namespace test. Is it truly required behaviour for the fixer to remove leading whitespace? (it isn't mentioned in the PSR-0 standard)

This PR implements the last TODO in #489.

Commits
-------

f69de3b Psr0Fixer to tokens
NamespaceNoLeadingWhitespaceFixerTest - preinc instead of postinc
minor #554 NamespaceNoLeadingWhitespaceFixerTest - preinc instead of postinc (keradus)

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

Discussion
----------

NamespaceNoLeadingWhitespaceFixerTest - preinc instead of postinc

Commits
-------

db069dd NamespaceNoLeadingWhitespaceFixerTest - preinc instead of postinc