我正在努力将
PHPCS实现到我的构建脚本中,并且相对容易地解决了所有错误和警告(以及SO的一些帮助:)).
但是,我无法弄清楚为什么我仍然得到一个ERROR,说该类缺少文件,类和函数doc注释.
---------------------------------------------------------------------- FOUND 7 ERRORS AFFECTING 7 LInes ---------------------------------------------------------------------- 2 | ERROR | Missing file doc comment 28 | ERROR | Missing class doc comment 45 | ERROR | Missing function doc comment 59 | ERROR | Missing function doc comment 73 | ERROR | Missing function doc comment 88 | ERROR | Missing function doc comment 102 | ERROR | Missing function doc comment ----------------------------------------------------------------------
这是PHP类:
<?PHP /** * EndpointHelper File Doc Comment * * @category EndpointHelper * @package Helper * @author Brian Smith <brian.smith@company.com> * @copyright copyright 2015 Company,Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE * @link http://arctg.com */ /** * EndpointHelper Class Doc Comment * * Endpoint Helper to retrieve application wide * URLs based on active webinstance. * * @category Class * @package EndpointHelper * @author Brian Smith <brian.smith@company.com> * @copyright copyright 2015 Company,Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE * @link http://company.com * * @since 1.0.1 */ class EndpointHelper { /** * Component params object * * @var type * @since 1.0.1 */ private static $params = false; /** * Retrieve Reservation URL based on web instance * * @return String * * @since 1.0.1 */ public static function getReservationUrl() { $instance = self::getInstanceType(); return self::$params->get($instance . '_reservation_api_url'); } /** * Retrieve Rental URL based on web instance * * @return String * * @since 1.0.1 */ public static function getRentalUrl() { $instance = self::getInstanceType(); return self::$params->get($instance . '_rental_api_url'); } /** * Retrieve cache URL based on web instance * * @return String * * @since 1.0.1 */ public static function getCacheUrl() { $instance = self::getInstanceType(); return self::$params->get($instance . '_data_cache_api_url'); } /** * Retrieve Systems Staging File Sync URL based on web * instance. * * @return String * * @since 1.0.1 */ public static function getFileSyncUrl() { $instance = self::getInstanceType(); return self::$params->get($instance . '_file_sync'); } /** * Private utilty class to retrieve current web instance * * @return String * * @since 1.0.1 */ private static function getInstanceType() { if (!self::$params) { self::$params = JComponentHelper::getParams('com_custom'); } return self::$params->get('web_instance'); } }
谢谢你的帮助!!
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。