. to -> autocorrection

It will be good if there will be some auto correction of input . to -> in object methods/fields while php programming. Cause it easier to push only . but not -> (of cause -> should stay )

4 comments

But . is string concatenation operator. And the __toString() method can be implement in the class. What if I wish concatenate returned from __toString() string with some string but PhpStrom will correct automatically my . to -> operator?

0

I think, that it can be smart autocorrection - only in that case, if
there -> using instead of . .As an example of such autocorrection -
Qt Creator 1.3.1 or higher - very useful thing in there, and I thought that it will
great to see it in WebStorm

0

I don't see how we can reliably trigger expansion of . to -> in context of arbitrary expression, thus we won't go for this feature.



However its quite easy to bound something like Ctrl-. or Ctrl-- to macro that will insert -> for you.
0

Please sign in to leave a comment.