Page 1 of 1

(done) Implementing interface (through Suggestions) return t

PostPosted: September 6th, 2018, 3:11 pm
by lvw
Hi,

Using the Suggestion icon to implement an interface in a class disregards the return types as defined in the interface.

Interface example:

Code: Select all
interface ISomeInterface
{
    public function someFunction() : string;
}


When using implementing via Suggestion i only get the comment block (with return type specified), but without the actual return type declaration behind the function like this:
Code: Select all
/**
*
* @return string
*/
function someFunction()
{
    // TODO: implement the function ISomeInterface::someFunction
}


I was expecting something like this:

Code: Select all
function someFunction() : string
{
    // TODO: implement the function ISomeInterface::someFunction
}


Also, a nice to have feature would be to have a option to in- or exclude the doc comments when using the Suggestions to auto-implement stuff and to in- or exclude the comment (//TODO: ) inside the empty function it generates.

PHP Tools 1.29.10924.2017
VS Enterprise 2017 15.8.2

Re: Implementing interface (through Suggestions) return type

PostPosted: September 6th, 2018, 4:59 pm
by Jakub Misek
Thanks for the suggestion. Will be implemented in the next update. I'll keep you notified in this thread.

Re: Implementing interface (through Suggestions) return type

PostPosted: September 7th, 2018, 7:28 am
by lvw
Thanks!

Re: Implementing interface (through Suggestions) return type

PostPosted: September 7th, 2018, 9:52 am
by Jakub Misek
Here is a preview version with your suggested improvements. Please let us know how it works for you. The options can be found in Tools / Options - Text Editor / PHP / Advanced.

https://www.devsense.com/en/download

Thanks,
Jakub

Re: (done) Implementing interface (through Suggestions) retu

PostPosted: September 7th, 2018, 10:46 am
by lvw
Wow, this is some quick support you have going on :D !

Installed and tested; works like a charm! Thank you very much!