#20265 [Opn->WFx]: PHPDoc and NULL variables
| From: | jellybob@php.net | Date: | Sun, 27 Apr 2003 16:14:18 +0000 |
| Subject: | #20265 [Opn->WFx]: PHPDoc and NULL variables | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15605@lists.php.net to get a copy of this message | ||
ID: 20265
Updated by: jellybob@php.net
Reported By: adam at tux dot appstate dot edu
-Status: Open
+Status: Wont fix
Bug Type: PEAR related
Operating System: Red Hat 8.0
PHP Version: 4.2.3
New Comment:
PHPDoc is no longer supported, please use PHPDocumentor instead (see
http://pear.php.net/package-info.php?package=PhpDocumentor
and
http://phpdocu.sourceforge.net/ for more details.)
Previous Comments:
------------------------------------------------------------------------
[2002-11-05 13:34:24] adam at tux dot appstate dot edu
When using the @param or @var markup and defining a type for a
variable, phpdoc gives errors in it's report when the default value for
a variable is NULL and it is not designated the "resource" type. IMHO
NULL should be a valid value for any variable type.
Ex:
/**
* This is a function
* @param string $var1 A variable with default=NULL
* @return string
*/
function foo($var1 = NULL) {
return $var1;
}
The above will produce the following in the report:
[function] foo mismatch
1st parameter type "$var1" does not match the the documented type
"string", possible error consider an update to "@param resource $var1 A
variable with default=NULL" or "@param resource A variable with
default=NULL", the variable name is optional.
I hope this is enough information.
Adam
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20265&edit=1