I don't want to document interface methods
[m6w6/ext-http] / scripts / check_docs.php
index 679e8caf6b2065911910344174ea1214f54685a0..79e5ff5eedd023b11a7c77227c65c01b487e2aac 100755 (executable)
@@ -52,7 +52,13 @@ foreach ($ext->getClasses() as $class) {
        }
        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());
+               try {
+                       $meth->getPrototype();
+               } catch (Exception $ex) {
+                       // if getPrototype throws an exception it's definitely not a method declared in an interface
+                       fg(sprintf("%s/%s.xml", $class->getName(), strtr(trim($meth->getName(),'_'),'_','-'))) or printf("\t%s::%s()\n", $class->getName(), $meth->getName());
+               }
+               
        }
        printf("\n");
 }