cvs: phpdoc /scripts check-references.php
| From: | Jakub Vrana | Date: | Fri, 15 Jun 2007 11:45:17 +0000 |
| Subject: | cvs: phpdoc /scripts check-references.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969376701@lists.php.net to get a copy of this message | ||
vrana Fri Jun 15 11:45:17 2007 UTC
Modified files:
/phpdoc/scripts check-references.php
Log:
More numer_refs
New Zend params
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/check-references.php?r1=1.21&r2=1.22&diff_format=u
Index: phpdoc/scripts/check-references.php
diff -u phpdoc/scripts/check-references.php:1.21 phpdoc/scripts/check-references.php:1.22
--- phpdoc/scripts/check-references.php:1.21 Thu Nov 17 23:04:23 2005
+++ phpdoc/scripts/check-references.php Fri Jun 15 11:45:17 2007
@@ -73,6 +73,10 @@
"http_arg_pass_ref_3" => array(3),
"http_arg_pass_ref_4" => array(4),
"http_arg_pass_ref_5" => array(5),
+ "secondandthird_arg_force_ref" => array(2, 3),
+ "fifthandsixth_arg_force_ref" => array(5, 6),
+ "seventh_arg_force_ref" => array(7),
+ "eighth_arg_force_ref" => array(8),
);
$valid_types = "int|float|string|bool|resource|array|object|mixed|number";
@@ -96,12 +100,22 @@
"O" => "object",
"z" => "mixed",
"Z" => "mixed",
+ "t" => "string",
+ "u" => "unicode",
+ "C" => "class",
+ "h" => "array",
+ "U" => "unicode",
+ "S" => "string",
+ "f" => "callback",
+ "x" => "string",
+ "T" => "unicode",
+
"|" => "optional"
);
$return = array();
for ($i=0; $i < strlen($type_spec); $i++) {
$ch = $type_spec[$i];
- if ($ch != "/" && $ch != "!") {
+ if ($ch != "/" && $ch != "!" && $ch != "&"
&& $ch != "^" && $ch != "*" && $ch != "+") {
if (!isset($zend_params[$ch])) {
echo "! Unknown formatting specifier '$ch' in '$type_spec'.\n";
$zend_params[$ch] = "unknown";
@@ -176,7 +190,6 @@
$source_types = array(); // array("function_name" => array("type_spec",
filename, lineno), ...)
$return_types = array(); // array("function_name" => array("doc_type",
filename, lineno), ...)
$source_arg_counts = array(); // array("function_name" => array(disallowed_count =>
true, ...), ...)
-//~ foreach (array("$phpsrc_dir/ext/standard") as $dirname) {
foreach (array_merge(array($zend_dir), glob("$phpsrc_dir/ext/*", GLOB_ONLYDIR),
glob("$pecl_dir/*", GLOB_ONLYDIR), glob("$phpsrc_dir/sapi/*", GLOB_ONLYDIR)) as
$dirname) {
if (dirname($dirname) == $pecl_dir && !file_exists("$phpdoc_dir/reference/" .
strtolower(basename($dirname)))) {
continue; // skip undocumented PECL extensions
@@ -225,7 +238,7 @@
}
// read parameters
- preg_match_all('~^(?:ZEND|PHP)(_NAMED)?_(?:FUNCTION|METHOD)\\(([^)]+)\\)(.*)^\\}~msU',
$file, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); // }}} is not in all sources so ^} is used
instead
+ preg_match_all('~^(?:static
)?(?:ZEND|PHP)(_NAMED)?_(?:FUNCTION|METHOD)\\(([^)]+)\\)(.*)^\\}~msU', $file, $matches,
PREG_SET_ORDER | PREG_OFFSET_CAPTURE); // }}} is not in all sources so ^} is used instead
foreach ($matches as $val) {
$function_name = strtolower(trim(preg_replace('~\\s*,\\s*~', '::',
($val[1][0] ? $aliases[$val[2][0]] : $val[2][0]))));
$function_body = $val[3][0];