ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487#488
ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487#488keradus merged 1 commit intoPHP-CS-Fixer:masterfrom
Conversation
|
Because all fixers deserve to use Tokens ;) |
7d4d326 to
c6bc9fa
Compare
c6bc9fa to
79b2024
Compare
|
@keradus when mentionning the fixed issues, it is better to put them in the PR description rather than the title. This way, they would get linked automatically |
|
Actually they were linked by commit ;) |
|
Can you add a testcase for https://github.com/fabpot/PHP-CS-Fixer/issues/167 as well ? |
|
yes |
79b2024 to
ec8ab57
Compare
ec8ab57 to
fc78741
Compare
c3c1134 to
8897fce
Compare
|
any opinion ? |
There was a problem hiding this comment.
shouldn't you use a backward iteration to avoid the need of bumping the limit ?
There was a problem hiding this comment.
Backward iteration help not bumping the limit when you add a Token at index greater than current iteration index.
Here we will add a Token at lesser index, one we do not meet yet, so we wiil need to increase limit as well. No gain.
|
👍 |
|
merged |
, #487 (keradus) This PR was merged into the 1.0.x-dev branch. Discussion ---------- ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487 ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487 Commits ------- 8897fce ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487
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
ReturnStatements - rewrite to use Tokens and fix for #167, #341, #487