NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Docvars for arrays not working


Joined: 30 May 2006
Posts: 92
Reply with quote
Hi,

would it be possible to fix generating docvars for arrays ?
In following code, NUSpere would suggest "mixed $catalog" rather than "array $catalog".

Code:

/**
* Set complete document catalog.
* @param mixed $catalog
*/
public function setCatalog(array $catalog){
   $this->catalog = $catalog;
}


It can correctly recognize docvars for objects, but arrays are somehow not working properly:-(
Using built 7021.

Thank you.
Lubos
View user's profileFind all posts by lubosdzSend private message
Re: Docvars for arrays not working


Joined: 30 May 2006
Posts: 92
Reply with quote
Waw, 7 years later, and still not fixed!
Not even feedback from IDE stuff ..

Support on NuSphere is really frustrating through the years, sorry.
And this forum looks like back in 2005 ..
View user's profileFind all posts by lubosdzSend private message


Joined: 26 Nov 2018
Posts: 36
Reply with quote
Very Sad Crying or Very sad
View user's profileFind all posts by piotrSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
I'm not sure that array is a correct type in this context. According to phpDocumenter, it's mixed[] is expected here.
https://docs.phpdoc.org/references/phpdoc/tags/param.html

PS
the following page refers to array as a valid type too. So it's valid.
https://docs.phpdoc.org/references/phpdoc/types.html

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


Joined: 30 May 2006
Posts: 92
Reply with quote
Hi,
your are right - proper type should be mixed[] - because arrays may contain anything - strings, floats, objects ..
PhpEd, however, generates mixed (without square brackets).
Perhaps it's not a big deal, but still - it would be slightly more precise annotation Smile
View user's profileFind all posts by lubosdzSend private message
Docvars for arrays not working
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