简体   繁体   English

在 PhpStorm 中查找所有没有文档的方法(最好在目录中)

[英]Find all methods without documentation (preferably inside a directory) in PhpStorm

Is there a way to find all the methods without documentation in PhpStorm 10?有没有办法在 PhpStorm 10 中找到没有文档的所有方法? What I can think of now is using regex, but I don't know how reliable it would be.我现在能想到的是使用正则表达式,但我不知道它有多可靠。

Code Inspect/PHPDoc section doesn't list any of them. Code Inspect/PHPDoc部分没有列出任何一个。

Ex: Do not find this:例如:不要找到这个:

/**
 * This method does something.
 * 
 * @param int $name     A parameter
 * 
 * @returns array       An array of something
 */
public function methodName($name)
{
    return array();
}

Find This:找到这个:

public function methodName($name)
{
    return array();
}

Or maybe even this:或者甚至这个:

/**
 * @param $name
 * @returns
 */
public function methodName($name)
{
    return array();
}

The name of the inspection you're looking for is "Missing PHPDoc comment", it's disabled by default.您要查找的检查名称是“缺少 PHPDoc 注释”,默认情况下它是禁用的。 You can use Code |您可以使用代码 | Run Inspection by Name or Code | 按名称代码运行检查| Inspect Code to find all of the occurrences. 检查代码以查找所有出现的情况。 Using these tools you can easily configure the desired scope.使用这些工具,您可以轻松配置所需的范围。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM