diff --git a/var/Typecho/Plugin.php b/var/Typecho/Plugin.php index ffded801..bf06feb8 100644 --- a/var/Typecho/Plugin.php +++ b/var/Typecho/Plugin.php @@ -188,7 +188,7 @@ class Typecho_Plugin * * @access public * @param string $pluginFile 插件文件路径 - * @return void + * @return array */ public static function parseInfo($pluginFile) { diff --git a/var/Widget/Abstract.php b/var/Widget/Abstract.php index 91b9f188..c33e55a4 100644 --- a/var/Widget/Abstract.php +++ b/var/Widget/Abstract.php @@ -50,7 +50,6 @@ abstract class Widget_Abstract extends Typecho_Widget * @param mixed $request request对象 * @param mixed $response response对象 * @param mixed $params 参数列表 - * @return void */ public function __construct($request, $response, $params = NULL) { diff --git a/var/Widget/Abstract/Comments.php b/var/Widget/Abstract/Comments.php index 21bf8acd..d6eeb9f1 100644 --- a/var/Widget/Abstract/Comments.php +++ b/var/Widget/Abstract/Comments.php @@ -393,7 +393,8 @@ class Widget_Abstract_Comments extends Widget_Abstract $this->pluginHandle(__CLASS__)->trigger($plugged)->gravatar($size, $rating, $default, $this); if (!$plugged) { - + + $mailHash = NULL; if (!empty($this->mail)) { $mailHash = md5(strtolower($this->mail)); } diff --git a/var/Widget/Abstract/Contents.php b/var/Widget/Abstract/Contents.php index 66b6a275..9236ed81 100644 --- a/var/Widget/Abstract/Contents.php +++ b/var/Widget/Abstract/Contents.php @@ -44,7 +44,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 获取词义化日期 * * @access protected - * @return void + * @return string */ protected function ___dateWord() { @@ -55,7 +55,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 获取父id * * @access protected - * @return void + * @return string */ protected function ___parentId() { @@ -79,7 +79,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * ___fields * * @access protected - * @return void + * @return Typecho_Config */ protected function ___fields() { @@ -144,7 +144,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 锚点id * * @access protected - * @return void + * @return string */ protected function ___theId() { @@ -155,7 +155,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 回复框id * * @access protected - * @return void + * @return string */ protected function ___respondId() { @@ -166,7 +166,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 评论地址 * * @access protected - * @return void + * @return string */ protected function ___commentUrl() { @@ -180,7 +180,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * trackback地址 * * @access protected - * @return void + * @return string */ protected function ___trackbackUrl() { @@ -192,7 +192,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 回复地址 * * @access protected - * @return void + * @return string */ protected function ___responseUrl() { @@ -336,7 +336,7 @@ class Widget_Abstract_Contents extends Widget_Abstract /** 更新缩略名 */ if ($updateRows > 0 && isset($content['slug'])) { - $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $condition); + $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $updateCondition); } return $updateRows; @@ -611,6 +611,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * @access public * @param array $value 需要过滤的行数据 * @return array + * @throws Typecho_Widget_Exception */ public function filter(array $value) { @@ -748,7 +749,6 @@ class Widget_Abstract_Contents extends Widget_Abstract * * @access public * @param string $format 日期格式 - * @return void */ public function date($format = NULL) { @@ -759,8 +759,7 @@ class Widget_Abstract_Contents extends Widget_Abstract * 输出文章内容 * * @access public - * @param string $more 文章截取后缀 - * @return void + * @param mixed $more 文章截取后缀 */ public function content($more = false) { @@ -774,7 +773,6 @@ class Widget_Abstract_Contents extends Widget_Abstract * @access public * @param integer $length 摘要截取长度 * @param string $trim 摘要后缀 - * @return void */ public function excerpt($length = 100, $trim = '...') { @@ -787,13 +785,14 @@ class Widget_Abstract_Contents extends Widget_Abstract * @access public * @param integer $length 标题截取长度 * @param string $trim 截取后缀 - * @return void */ public function title($length = 0, $trim = '...') { $title = $this->pluginHandle()->trigger($plugged)->title($this->title, $this); if (!$plugged) { echo $length > 0 ? Typecho_Common::subStr($this->title, 0, $length, $trim) : $this->title; + } else { + echo $title; } } @@ -801,8 +800,6 @@ class Widget_Abstract_Contents extends Widget_Abstract * 输出文章评论数 * * @access public - * @param string $string 评论数格式化数据 - * @return void */ public function commentsNum() { @@ -820,8 +817,6 @@ class Widget_Abstract_Contents extends Widget_Abstract * 获取文章权限 * * @access public - * @param string $permission 权限 - * @return unknown */ public function allow() { diff --git a/var/Widget/Abstract/Metas.php b/var/Widget/Abstract/Metas.php index afab1dbe..df86c484 100644 --- a/var/Widget/Abstract/Metas.php +++ b/var/Widget/Abstract/Metas.php @@ -23,7 +23,7 @@ class Widget_Abstract_Metas extends Widget_Abstract * 锚点id * * @access protected - * @return void + * @return string */ protected function ___theId() { @@ -141,7 +141,7 @@ class Widget_Abstract_Metas extends Widget_Abstract * @param mixed $type * @param int $parent * @access public - * @return void + * @return integer */ public function getMaxOrder($type, $parent = 0) { @@ -280,7 +280,7 @@ class Widget_Abstract_Metas extends Widget_Abstract * 根据内容的指定类别和状态更新相关meta的计数信息 * * @access public - * @param Tint $mid meta id + * @param int $mid meta id * @param string $type 类别 * @param string $status 状态 * @return void diff --git a/var/Widget/Abstract/Users.php b/var/Widget/Abstract/Users.php index 58a22bee..2e3570f3 100644 --- a/var/Widget/Abstract/Users.php +++ b/var/Widget/Abstract/Users.php @@ -23,7 +23,7 @@ class Widget_Abstract_Users extends Widget_Abstract * ___options * * @access protected - * @return Config + * @return Typecho_Config */ protected function ___options() { @@ -234,6 +234,7 @@ class Widget_Abstract_Users extends Widget_Abstract * @param integer $size 头像尺寸 * @param string $rating 头像评级 * @param string $default 默认输出头像 + * @param string $class 默认css class * @return void */ public function gravatar($size = 40, $rating = 'X', $default = NULL, $class = NULL) diff --git a/var/Widget/Ajax.php b/var/Widget/Ajax.php index a8113a38..1b920d03 100644 --- a/var/Widget/Ajax.php +++ b/var/Widget/Ajax.php @@ -34,8 +34,7 @@ class Widget_Ajax extends Widget_Abstract_Options implements Widget_Interface_Do /** * 获取最新版本 * - * @access public - * @return void + * @throws Typecho_Widget_Exception */ public function checkVersion() { @@ -81,8 +80,7 @@ class Widget_Ajax extends Widget_Abstract_Options implements Widget_Interface_Do /** * 远程请求代理 * - * @access public - * @return void + * @throws Typecho_Widget_Exception */ public function feed() { diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index d4504faf..eb254aa5 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -84,7 +84,7 @@ class Widget_Archive extends Widget_Abstract_Contents * 聚合器对象 * * @access private - * @var Typecho_Feed_Writer + * @var Typecho_Feed */ private $_feed; @@ -202,15 +202,13 @@ class Widget_Archive extends Widget_Abstract_Contents */ private $_pageNav; - /** * 构造函数,初始化组件 * - * @access public - * @param mixed $request request对象 - * @param mixed $response response对象 - * @param mixed $params 参数列表 - * @return void + * @param mixed $request + * @param mixed $response + * @param mixed $params + * @throws Typecho_Widget_Exception */ public function __construct($request, $response, $params = NULL) { diff --git a/var/Widget/Do.php b/var/Widget/Do.php index c197527b..9890d8c8 100644 --- a/var/Widget/Do.php +++ b/var/Widget/Do.php @@ -51,6 +51,7 @@ class Widget_Do extends Typecho_Widget * * @access public * @return void + * @throws Typecho_Widget_Exception */ public function execute() { diff --git a/var/Widget/ExceptionHandle.php b/var/Widget/ExceptionHandle.php index 0a1c72f1..dee72dc6 100644 --- a/var/Widget/ExceptionHandle.php +++ b/var/Widget/ExceptionHandle.php @@ -20,10 +20,6 @@ class Widget_ExceptionHandle extends Widget_Archive { /** * 重载构造函数 - * - * @access public - * @param Exception $excepiton 抛出的异常 - * @return void */ public function __construct() { diff --git a/var/Widget/Feedback.php b/var/Widget/Feedback.php index bdfcf040..4da015bf 100644 --- a/var/Widget/Feedback.php +++ b/var/Widget/Feedback.php @@ -30,8 +30,9 @@ class Widget_Feedback extends Widget_Abstract_Comments implements Widget_Interfa /** * 评论处理函数 * - * @access private - * @return void + * @throws Typecho_Widget_Exception + * @throws Exception + * @throws Typecho_Exception */ private function comment() {