| Re: [pdt-dev] code assist development |
On Thu, Oct 22, 2009 at 8:34 PM, Sjaak Eenhuis <exceptione@xxxxxxxxxxx> wrote:Currently, pdt doesn't indicate if a certain function parameter is required or optional. As I understand from http://doc.php.net/php/dochowto/chapter-skeletons.php you provide this information allready.
So visually indicating what is required and what not is something which can be accomplished already by the pdt developers.
However, as far as I can see the docbook sources don't contain the actual default value of such an optional parameter. This would come in handy, in cases like
string htmlspecialchars ( string $string [, int $quote_style = ENT_COMPAT [, string $charset [, bool $double_encode = true ]]] )
If I want to use htmlspecialchars with ENT_NOQUOTES I want to see whether I need to override the default of $quote_style.
I've encoutered this type of issues more than once and this info is imho useful enough to have it.
I am curious about your opinions.
The generated PHP language model does contain an indication about optional parameters in PHPDoc and using parameter initializer (if you open standard.php you'll see it). The problem is that Code Assist doesn't really use this information to present it in a fancy style that you mentioned. We can fix it in the future.
Regards, Philip