NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
phpdoc problem


Joined: 19 Oct 2004
Posts: 14
Reply with quote
Hello.

I'm using phpdoc in my code, but Phped (v4.6.1) doesn't recognize the tags. Why?
Here is a example:

Code:

  //----------------------------------------------------------------------------
  /**
  * @desc  The description
  *
  * @param  par_strString
  *
  * @return  something
  *
  * @author  Mario Stiffel
  *///-------------------------------------------------------------------------- 
  public function example ($par_strString)
  {...


Thanks.
View user's profileFind all posts by m.stiffelSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
What makes you thinking they are not supported?
Please look at his sample, without supporting phpdoc it would not work:



BTW, you're using "public" keyword which clearly indicates you're working with php5. Did you associate .php extension with PHP5 in tools->settings->file association?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Oct 2004
Posts: 14
Reply with quote
Her is a full example:

Code:
class ClassTest
{

  //----------------------------------------------------------------------------
  /**
  * @desc  The description
  *
  * @param  par_strString
  *
  * @return  ClassTest 
  *
  *///--------------------------------------------------------------------------
  public function example ($par_strString)
  {
  }
  //----------------------------------------------------------------------------

}

$test = new ClassTest();
$var = $test->example();


Phped doesn't display the description of "example()" and doesn't know the type of "$var". Why?
View user's profileFind all posts by m.stiffelSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Your code sample works well:



all you need is to get that extra comment after phpdoc removed.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Oct 2004
Posts: 14
Reply with quote
I have modified my comments and now it works fine. THX.

The new version looks like this:
Code:

class ClassTest
{

  //----------------------------------------------------------------------------
  /**
  * @desc  The description
  *
  * @param  par_strString
  *
  * @return  ClassTest
  ----------------------------------------------------------------------------*/
  public function example ($par_strString)
  {
  }
  //----------------------------------------------------------------------------

}

$test = new ClassTest();
$var = $test->example();
View user's profileFind all posts by m.stiffelSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
you're welcome.

BTW, I'd avoid such long-dash comments in phpdoc. They will clutter code insight database with unusable info Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
phpdoc problem
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic