In my case (VSCODE + DEVSENSE PHP extension) I got errors, as it parses the first word after the variable as the type. Which is Optional int this case.
And as I see now, the documented way of PHPDoc is even:
@param [<Type>] [name] [<description>]
And in this lib,
@param [name] [] [(optional)] []
is used mostly...
With also String needs to be a lower case string.
Or do you use another method/library for documentation?
I got warnings in my code base when using library functions with optional parameters, when using e.g.
initializeDatabase
.https://github.com/rafaelwendel/phpsupabase/blob/main/src/Service.php#L160
Documentation : https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/param.html
In my case (VSCODE + DEVSENSE PHP extension) I got errors, as it parses the first word after the variable as the type. Which is
Optional
int this case.And as I see now, the documented way of PHPDoc is even:
@param [<Type>] [name] [<description>]
And in this lib,
@param [name] [] [(optional)] []
is used mostly...
With also
String
needs to be a lower casestring
.Or do you use another method/library for documentation?
Thanks!