Open eddiriarte opened 7 years ago
A quick fix would be to replace the line 4903 of the fmt.stub.php file accessible after uncompressing the fmt.phar :
$this->appendCode(' ' . $text . $this->getSpace(!$this->rightTokenIs(ST_COLON)));
by :
$this->appendCode(' ' . $text . $this->getSpace(!$this->rightTokenIs(ST_COLON) && ($id !== ST_QUESTION || !$this->rightTokenIs(T_STRING))));
I made a repository to fix this issue : https://github.com/MKCG/phpfmt_7-1 It seems to work properly and have no side effect.
hi,
thx, gonna try this tomorrow at work.
just quick reviewed your code and I was doing something similar few lines before... but i was forced to divide the ST_CONCAT
and ST_QUESTION
blocks in the switch(and duplicate some lines)... hope your solution is better ;)
btw. i was using https://github.com/Shaked/php.tools to generate the phar... it has also some tests to check regressions.
Hi, after change the following code, several tests are broken. By the way, Anyone want to join the phpfmt-next organization to continue developing ?
this:
is beeing transformed to....
Due to several complainings with my colleages I disabled the "space resizing"
... anyway maybe you could find a way to fix this in the next versions. THX