svn: /phpdoc/doc-base/trunk/scripts/ check-references.php
| From: | Jakub Vrana | Date: | Mon, 23 Nov 2009 11:58:09 +0000 |
| Subject: | svn: /phpdoc/doc-base/trunk/scripts/ check-references.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-5541@lists.php.net to get a copy of this message | ||
vrana Mon, 23 Nov 2009 11:58:09 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291193
Log:
Don't parse return type of constructor
Changed paths:
U phpdoc/doc-base/trunk/scripts/check-references.php
Modified: phpdoc/doc-base/trunk/scripts/check-references.php
===================================================================
--- phpdoc/doc-base/trunk/scripts/check-references.php 2009-11-23 11:54:07 UTC (rev 291192)
+++ phpdoc/doc-base/trunk/scripts/check-references.php 2009-11-23 11:58:09 UTC (rev 291193)
@@ -34,7 +34,7 @@
echo "- Compares documentation with PHP sources (Zend, extensions, PECL, SAPI).\n";
echo "- Functions not found in sources are checked as without references.\n";
echo "- Types and optional params are checked only in some functions.\n";
- exit();
+ exit(1);
}
$extension = $_SERVER["argv"][2];
@@ -402,8 +402,7 @@
// return type
if (isset($return_types[$function_name])) {
$counts["return"]++;
- $modifier = (preg_match('~::__construct$~', $function_name) ? "i" :
"");
- if (!preg_match("~<type>(" . $return_types[$function_name][0] .
")</type>~$modifier", $return_type) && ($return_types[$function_name][0] !=
"object" ||
preg_match("~<type>($valid_types|$invalid_types)</type>~", $return_type))) {
+ if (!preg_match('~::__construct$~', $function_name) &&
!preg_match("~<type>(" . $return_types[$function_name][0] .
")</type>~", $return_type) && ($return_types[$function_name][0] !=
"object" ||
preg_match("~<type>($valid_types|$invalid_types)</type>~", $return_type))) {
echo "Wrong return type in $filename on line $lineno.\n";
echo $return_types[$function_name][1] . ":" . $return_types[$function_name][2] .
": " . $return_types[$function_name][0] . "\n";
}