你可以使用
PHPCS
您需要为PHPDOC添加自己的规则,即here’s the Sniff
我想你把它添加到你的规则中:
但我没有测试过.确认的作品……现在我要添加phpdoc. :/
我的phpcs.xml:
Example
./api
*/Database/Proxies/*
$bin/phpcs
FILE: ...ttpdocs/api/Api/Version1/Software/AbstractSoftwareController.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
60 | ERROR | Missing @throws tag for "\DomainException" exception
----------------------------------------------------------------------
Time: 5.55 secs; Memory: 19.5Mb