getPathname(); $filename = $file->getBasename(); if (strpos($filepath, '.svn')) { continue; } if (!$file->isFile() || pathinfo($filepath, PATHINFO_EXTENSION) !== 'xml') { continue; } $fileid = str_replace($phpdoc_path, '', $filepath); $ext = strtok($fileid, DIRECTORY_SEPARATOR); if (file_exists($phpdoc_path . $fileid)) { $contents = file_get_contents($phpdoc_path . $fileid); if (false !== strpos($contents, 'warn.undocumented.func')) { $undocumented[$ext][] = $fileid; ++$count; } continue; } } echo 'List of underdocumented functions/methods', PHP_EOL; print_r($undocumented); echo "Number underdocumented: ", $count, PHP_EOL; function usage() { echo PHP_EOL, 'USAGE:', PHP_EOL; echo 'php ', $_SERVER['SCRIPT_FILENAME'], ' -p /path/to/phpdoc/en/reference/', PHP_EOL; exit; }