(done) Implementing interface (through Suggestions) return t

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

(done) Implementing interface (through Suggestions) return t

Postby lvw » September 6th, 2018, 3:11 pm

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
lvw
 
Posts: 7
Joined: September 6th, 2018, 2:52 pm

Re: Implementing interface (through Suggestions) return type

Postby Jakub Misek » September 6th, 2018, 4:59 pm

Thanks for the suggestion. Will be implemented in the next update. I'll keep you notified in this thread.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2085
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Implementing interface (through Suggestions) return type

Postby lvw » September 7th, 2018, 7:28 am

Thanks!
lvw
 
Posts: 7
Joined: September 6th, 2018, 2:52 pm

Re: Implementing interface (through Suggestions) return type

Postby Jakub Misek » September 7th, 2018, 9:52 am

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
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2085
Joined: January 4th, 2012, 2:42 pm
Location: Prague

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

Postby lvw » September 7th, 2018, 10:46 am

Wow, this is some quick support you have going on :D !

Installed and tested; works like a charm! Thank you very much!
lvw
 
Posts: 7
Joined: September 6th, 2018, 2:52 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 2 guests
Phalanger