Any way to do PHP function summary/comment?
8 posts
• Page 1 of 1
Any way to do PHP function summary/comment?
Hey. Was wondering if there was any way to add summarys to PHP functions so that intellisense could make use of them. I've tried the usual:
///<summary>
///This is a description of my function.
///</summary>
but no luck
Maybe it's not supported in PHP Tools for Visual Studio yet?
///<summary>
///This is a description of my function.
///</summary>
but no luck
Maybe it's not supported in PHP Tools for Visual Studio yet?
- RicardoPaulinski
- Posts: 2
- Joined: August 17th, 2012, 3:19 pm
Re: Any way to do PHP function summary/comment?
Hi!
In PHP there is different syntax of documentary comments - called PHPDoc.
It looks like this
More info at http://en.wikipedia.org/wiki/PHPDoc
PHP Tools supports this syntax, reads type hints from comments and helps you while typing comments by showing possible keywords after @ and making smart indentation inside PHPDoc text.
In PHP there is different syntax of documentary comments - called PHPDoc.
It looks like this
- Code: Select all
/**
* Short summary.
*
* Long summary.
* @return array Returns an array of items.
*/
function foo(){}
More info at http://en.wikipedia.org/wiki/PHPDoc
PHP Tools supports this syntax, reads type hints from comments and helps you while typing comments by showing possible keywords after @ and making smart indentation inside PHPDoc text.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Any way to do PHP function summary/comment?
Hi Ricardo,
Jakub's right, PHPDoc is standard comment type. Is this some kind of PHP comment type you've seen in other PHP IDE?
Thanks
Jakub's right, PHPDoc is standard comment type. Is this some kind of PHP comment type you've seen in other PHP IDE?
Thanks
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: Any way to do PHP function summary/comment?
Ricardo seems to be referencing the XMLDoc stuff you use with C# in Visual Studio.
One note, would it be possible to take the Zend Studio approach to phpDoc comments and sort of pre-fill them based on the arguments it finds for a function? If you're not familiar with it, I can make a short video of what it does...
One note, would it be possible to take the Zend Studio approach to phpDoc comments and sort of pre-fill them based on the arguments it finds for a function? If you're not familiar with it, I can make a short video of what it does...
-
AndyM84 - Posts: 69
- Joined: August 6th, 2012, 3:24 pm
- Location: Boston, MA, USA
Re: Any way to do PHP function summary/comment?
AndyM84 wrote:pre-fill them based on the arguments it finds for a function?
Yes, we are planning this feature. Once you type /** before a function declaration, it would complete the whole PHPDoc skeleton, with parameters name.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Any way to do PHP function summary/comment?
That's why I love you guys.
-
AndyM84 - Posts: 69
- Joined: August 6th, 2012, 3:24 pm
- Location: Boston, MA, USA
Re: Any way to do PHP function summary/comment?
Thanks so much guys, this is perfect.
- RicardoPaulinski
- Posts: 2
- Joined: August 17th, 2012, 3:19 pm
Re: Any way to do PHP function summary/comment?
This feature has been implemented, and will be available in the next update.
Thanks for Your ideas!
Thanks for Your ideas!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 44 guests