#20265 [NEW]: PHPDoc and NULL variables
| From: | adam at tux dot appstate dot edu | Date: | Tue, 05 Nov 2002 19:34:24 +0000 |
| Subject: | #20265 [NEW]: PHPDoc and NULL variables | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10485@lists.php.net to get a copy of this message | ||
From: adam@tux.appstate.edu
Operating system: Red Hat 8.0
PHP version: 4.2.3
PHP Bug Type: PEAR related
Bug description: PHPDoc and NULL variables
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 bug report at http://bugs.php.net/?id=20265&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20265&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20265&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20265&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20265&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20265&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20265&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20265&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20265&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20265&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20265&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20265&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20265&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20265&r=isapi