SublimePHPCompanion icon indicating copy to clipboard operation
SublimePHPCompanion copied to clipboard

Insert constructor property doesn't behave intuitively with multiple classes in one file

Open adamwathan opened this issue 8 years ago • 1 comments

Often times in tests I define little throwaway classes at the bottom that are only used in that test. The "insert constructor property" command seems to always insert the property in either the first constructor in the file if there's already a constructor somewhere, or the first class in the file if none of the classes have a constructor.

It would be super nice if it looked for the first class or constructor definition above wherever the cursor is :+1:

companion-injection

adamwathan avatar Jan 23 '16 03:01 adamwathan

I mark this as an enhancement as it a real use case and not just a bug.

I will not work on this myself as I never write two classes in the same file but I let this open for anyone.

erichard avatar Jan 25 '17 07:01 erichard