You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
controls_spaces fixer does not handle cases like this:
Original: if( $test ){
Fixed: if ( $test ) {
Expected: if ($test) {
I experimented a bit and managed to fix this issue, but I have some weird case when it does not work.
Works for if ($this->tesT ($test)) {
Does not work for: if ($this->testtesT ($test)) {
Since I'm not a regex guru, this is a call for regex ninjas to take a look at my fix and help me finish it, or suggest new solution. I'm opened for all suggestions. Thanks in advance.
The text was updated successfully, but these errors were encountered:
Commits
-------
00d5366 cosmetics
9bd0f30 fixed regexp in ControlSpacesFixer
ed5ffe0 Fix spaces under brackets for if statements.
Discussion
----------
Control spaces under brackets
Fixes spaces under brackets descrbed in [issue #66](https://github.com/fabpot/PHP-CS-Fixer/issues/66)
Example:
`if( $test ){` -> `if ($test) {`
controls_spaces
fixer does not handle cases like this:Original:
if( $test ){
Fixed:
if ( $test ) {
Expected:
if ($test) {
I experimented a bit and managed to fix this issue, but I have some weird case when it does not work.
Works for
if ($this->tesT ($test)) {
Does not work for:
if ($this->testtesT ($test)) {
Since I'm not a regex guru, this is a call for regex ninjas to take a look at my fix and help me finish it, or suggest new solution. I'm opened for all suggestions. Thanks in advance.
The text was updated successfully, but these errors were encountered: