I have a complex PHP project that contains two definitions for a function foo
. One of those is in a vendor library, and I never use it, the other one I use a lot. The implementation in the vendor library throws an Exception, the correct implementation does not. Now anytime I write a function that calls foo(), PhpStorm's code inspections say I should declare a @throws \\Execption in the caller's PhpDoc. I'd like to suppress that warning in this case, and maybe tell PhpStorm that I will never use the function in the vendor library.
I've experimented with Scopes, but couldn't make that work - I can prevent PhpStorm from reporting warnings in the vendor files, but not from analyzing them for symbols used in my own code.
在方法foo()的顶部添加/** @noinspection PhpDocMissingThrowsInspection */
或/** @noinspection ALL */
(用于禁用所有检查)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.