projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
3837de7
)
- check all class members
author
Michael Wallner
<mike@php.net>
Thu, 29 Mar 2007 15:34:38 +0000
(15:34 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 29 Mar 2007 15:34:38 +0000
(15:34 +0000)
scripts/check_docs.php
patch
|
blob
|
history
diff --git
a/scripts/check_docs.php
b/scripts/check_docs.php
index d65effa1ed37733d3417192c4f976dfc532375d2..679e8caf6b2065911910344174ea1214f54685a0 100755
(executable)
--- a/
scripts/check_docs.php
+++ b/
scripts/check_docs.php
@@
-4,7
+4,7
@@
function re($file, $re, &$m=NULL) {
global $doc;
function re($file, $re, &$m=NULL) {
global $doc;
- return
preg_match($re, file_get_contents("$doc/$file"), $m)
;
+ return
file_exists("$doc/$file") ? preg_match($re, file_get_contents("$doc/$file"), $m) : 0
;
}
function fe($file) {
global $doc;
}
function fe($file) {
global $doc;
@@
-38,12
+38,20
@@
foreach ($ext->getFunctions() as $func) {
}
printf("\n");
}
printf("\n");
-printf("Undocumented classes/me
thod
s:\n");
+printf("Undocumented classes/me
mber
s:\n");
foreach ($ext->getClasses() as $class) {
if (substr($class->getName(), -strlen("Exception")) === "Exception") continue;
/* @var $class ReflectionClass */
fg(sprintf("%s.xml", $class->getName())) or printf(" %s\n", $class->getName());
foreach ($ext->getClasses() as $class) {
if (substr($class->getName(), -strlen("Exception")) === "Exception") continue;
/* @var $class ReflectionClass */
fg(sprintf("%s.xml", $class->getName())) or printf(" %s\n", $class->getName());
+ foreach ($class->getConstants() as $name => $tmp) {
+ re($class->getName().".xml", "#>$name<#") or printf("\t%s::%s (%s)\n", $class->getName(), $name, $tmp);
+ }
+ foreach ($class->getProperties() as $prop) {
+ // blatant guess
+ re($class->getName().".xml", "#>{$prop->getName()}<#") or printf("\t%s::$%s\n", $class->getName(), $prop->getName());
+ }
foreach ($class->getMethods() as $meth) {
foreach ($class->getMethods() as $meth) {
+ /* @var $meth ReflectionMethod */
fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s::%s()\n", $class->getName(), $meth->getName());
}
printf("\n");
fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s::%s()\n", $class->getName(), $meth->getName());
}
printf("\n");