From f6a708e1f805637c30ab84eda31d7d66c8dc5f73 Mon Sep 17 00:00:00 2001 From: Jinchun Yang Date: Fri, 29 Jan 2016 22:28:01 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=89=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=B3=A8=E9=87=8A=E7=9A=84=E9=94=99=E8=AF=AF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=B1=BB=E5=9E=8B=E5=92=8C=E8=BF=94=E5=9B=9E=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=202=EF=BC=89=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=97=A0=E6=84=8F=E4=B9=89=E7=9A=84=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D=203=EF=BC=89=E6=9C=AC=E6=AC=A1=20commit=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=80=BB=E8=BE=91=E4=B8=8A=E7=9A=84=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 6 ++-- library/think/Config.php | 2 +- library/think/Controller.php | 2 +- library/think/Cookie.php | 2 +- library/think/Debug.php | 2 +- library/think/Error.php | 16 +++++----- library/think/Hook.php | 4 +-- library/think/Model.php | 24 +++++++++++---- library/think/Response.php | 12 ++++---- library/think/Session.php | 29 +++++++------------ library/think/Template.php | 1 + library/think/Url.php | 2 +- library/think/View.php | 2 ++ library/think/cache/driver/Db.php | 6 ++-- library/think/cache/driver/File.php | 8 ++--- library/think/cache/driver/Memcache.php | 1 + library/think/cache/driver/Secache.php | 8 ++--- library/think/db/Driver.php | 24 ++++++++++----- library/think/db/driver/Oracle.php | 4 ++- library/think/db/driver/Pgsql.php | 2 +- library/think/log/alarm/Email.php | 2 +- library/think/log/driver/Socket.php | 5 ++-- library/think/template/TagLib.php | 8 ++--- library/traits/controller/Jump.php | 6 ++-- library/traits/model/Adv.php | 5 ++-- library/traits/model/Auto.php | 4 +-- tests/thinkphp/library/think/debugTest.php | 1 - tests/thinkphp/library/think/responseTest.php | 2 +- tests/thinkphp/library/think/sessionTest.php | 2 +- 29 files changed, 104 insertions(+), 88 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index fa3733ea..4c75f1f4 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -319,7 +319,7 @@ class App } // 分析 PATH_INFO - private static function parsePathinfo($config) + private static function parsePathinfo(array $config) { if (isset($_GET[$config['var_pathinfo']])) { // 判断URL里面是否有兼容模式参数 @@ -347,10 +347,10 @@ class App /** * URL路由检测(根据PATH_INFO) * @access public - * @param $config + * @param array $config * @throws Exception */ - public static function route($config) + public static function route(array $config) { // 解析PATH_INFO self::parsePathinfo($config); diff --git a/library/think/Config.php b/library/think/Config.php index b656e8a5..6d9dbf14 100644 --- a/library/think/Config.php +++ b/library/think/Config.php @@ -158,7 +158,7 @@ class Config */ public static function reset($range = '') { - $range = $range ?: self::$range; + $range = $range ?: self::$range; true === $range ? self::$config = [] : self::$config[$range] = []; } } diff --git a/library/think/Controller.php b/library/think/Controller.php index 00019de7..ba01953a 100644 --- a/library/think/Controller.php +++ b/library/think/Controller.php @@ -21,7 +21,7 @@ class Controller /** * 前置操作方法列表 - * @var beforeActionList + * @var array $beforeActionList * @access protected */ protected $beforeActionList = []; diff --git a/library/think/Cookie.php b/library/think/Cookie.php index e3381ee4..d8b5b5d5 100644 --- a/library/think/Cookie.php +++ b/library/think/Cookie.php @@ -60,7 +60,7 @@ class Cookie * * @param string $name cookie名称 * @param mixed $value cookie值 - * @param null $option + * @param mixed $option 可选参数 可能会是 null|integer|string * * @return mixed * @internal param mixed $options cookie参数 diff --git a/library/think/Debug.php b/library/think/Debug.php index 04249ff6..89feea77 100644 --- a/library/think/Debug.php +++ b/library/think/Debug.php @@ -132,7 +132,7 @@ class Debug /** * 获取文件加载信息 * @param bool $detail 是否显示详细 - * @return void + * @return integer|array */ public static function getFile($detail = false) { diff --git a/library/think/Error.php b/library/think/Error.php index acee443e..11024459 100644 --- a/library/think/Error.php +++ b/library/think/Error.php @@ -36,18 +36,18 @@ class Error /** * 自定义错误处理 * @access public - * @param int $errno 错误类型 - * @param string $errstr 错误信息 - * @param string $errfile 错误文件 - * @param int $errline 错误行数 + * @param int $error_number 错误类型 + * @param string $error_string 错误信息 + * @param string $error_file 错误文件 + * @param int $error_line 错误行数 * @return void */ - public static function appError($errno, $errstr, $errfile, $errline) + public static function appError($error_number, $error_string, $error_file, $error_line) { - $errorStr = "[{$errno}] {$errstr} {$errfile} 第 {$errline} 行."; - switch ($errno) { + $errorStr = "[{$error_number}] {$error_string} {$error_file} 第 {$error_line} 行."; + switch ($error_number) { case E_USER_ERROR: - self::halt($errorStr, $errno); + self::halt($errorStr, $error_number); break; case E_STRICT: case E_USER_WARNING: diff --git a/library/think/Hook.php b/library/think/Hook.php index ade83e0b..8197bfa0 100644 --- a/library/think/Hook.php +++ b/library/think/Hook.php @@ -43,7 +43,7 @@ class Hook * @param boolean $recursive 是否递归合并 * @return void */ - public static function import($tags, $recursive = true) + public static function import(array $tags, $recursive = true) { if (!$recursive) { // 覆盖导入 @@ -117,7 +117,7 @@ class Hook * @param string $class 行为类名称 * @param string $tag 方法名(标签名) * @param Mixed $params 传人的参数 - * @return void + * @return mixed */ public static function exec($class, $tag = '', &$params = null) { diff --git a/library/think/Model.php b/library/think/Model.php index b3e5ca5e..6c06e4ac 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -150,6 +150,7 @@ class Model * @param string $method 方法名称 * @param array $args 调用参数 * @return mixed + * @throws \think\Exception */ public function __call($method, $args) { @@ -185,6 +186,7 @@ class Model * @param mixed $data 要操作的数据 * @param string $type insert 或者 update * @return array + * @throws \think\Exception */ protected function _write_data($data, $type) { @@ -255,6 +257,7 @@ class Model * @param mixed $data 数据 * @param boolean $replace 是否replace * @return mixed + * @throws \think\Exception */ public function add($data = '', $replace = false) { @@ -332,6 +335,7 @@ class Model * @access public * @param mixed $data 数据 * @return boolean + * @throws \think\Exception */ public function save($data = '') { @@ -406,6 +410,7 @@ class Model * @access public * @param mixed $options 表达式 * @return mixed + * @throws \think\Exception */ public function delete($options = []) { @@ -476,6 +481,7 @@ class Model * @access public * @param mixed $options 表达式参数 * @return mixed + * @throws \think\Exception */ public function select($options = []) { @@ -532,7 +538,7 @@ class Model } // 数据列表读取后的处理 - $resultSet = $this->_read_datalist($resultSet, $options); + $resultSet = $this->_read_data_list($resultSet, $options); // 回调 $this->_after_select($resultSet, $options); if (isset($options['index'])) { @@ -559,10 +565,10 @@ class Model /** * 数据列表读取后的处理 * @access protected - * @param array $data 当前数据 + * @param array $resultSet 当前数据 * @return array */ - protected function _read_datalist($resultSet, $options) + protected function _read_data_list($resultSet, $options) { $resultSet = array_map([$this, '_read_data'], $resultSet); return $resultSet; @@ -574,9 +580,9 @@ class Model /** * 获取一条记录的某个字段值 * @access public - * @param string $field 字段名 - * @param string $spea 字段数据间隔符号 NULL返回数组 - * @return mixed + * @param string $field 字段名 + * @param null $sepa 字段数据间隔符号 NULL返回数组 + * @return array|mixed|null */ public function getField($field, $sepa = null) { @@ -677,6 +683,7 @@ class Model * @param integer $step 增长值 * @param integer $lazyTime 延时时间(s) * @return boolean + * @throws \think\Exception */ public function setInc($field, $step = 1, $lazyTime = 0) { @@ -705,6 +712,7 @@ class Model * @param integer $step 减少值 * @param integer $lazyTime 延时时间(s) * @return boolean + * @throws \think\Exception */ public function setDec($field, $step = 1, $lazyTime = 0) { @@ -835,6 +843,7 @@ class Model * @access public * @param mixed $options 表达式参数 * @return mixed + * @throws \think\Exception */ public function find($options = []) { @@ -930,6 +939,7 @@ class Model * @param mixed $data 创建数据 * @param string $type 状态 * @return mixed + * @throws \think\Exception */ public function create($data = '', $type = '') { @@ -1198,6 +1208,7 @@ class Model * @access public * @param mixed $data 数据 * @return Model + * @throws \think\Exception */ public function data($data = '') { @@ -1308,6 +1319,7 @@ class Model * @param mixed $union * @param boolean $all * @return Model + * @throws \think\Exception */ public function union($union, $all = false) { diff --git a/library/think/Response.php b/library/think/Response.php index 4fd76d59..98a01b8b 100644 --- a/library/think/Response.php +++ b/library/think/Response.php @@ -28,7 +28,7 @@ class Response * @param mixed $data 要返回的数据 * @param String $type 返回数据格式 * @param bool $return 是否返回数据 - * @return void + * @return mixed */ public static function send($data = '', $type = '', $return = false) { @@ -95,7 +95,7 @@ class Response * 输出类型设置 * @access public * @param string $type 输出内容的格式类型 - * @return void + * @return mixed */ public static function type($type = null) { @@ -120,7 +120,7 @@ class Response * 输出是否exit设置 * @access public * @param bool $exit 是否退出 - * @return void + * @return mixed */ public static function isExit($exit = null) { @@ -137,7 +137,7 @@ class Response * @param integer $code 返回的code * @param mixed $msg 提示信息 * @param string $type 返回数据格式 - * @return void + * @return mixed */ public static function result($data, $code = 0, $msg = '', $type = '') { @@ -161,7 +161,7 @@ class Response * @param mixed $data 返回的数据 * @param mixed $url 跳转的URL地址 * @param mixed $wait 跳转等待时间 - * @return void + * @return mixed */ public static function success($msg = '', $data = '', $url = '', $wait = 3) { @@ -194,7 +194,7 @@ class Response * @param mixed $data 返回的数据 * @param mixed $url 跳转的URL地址 * @param mixed $wait 跳转等待时间 - * @return void + * @return mixed */ public static function error($msg = '', $data = '', $url = '', $wait = 3) { diff --git a/library/think/Session.php b/library/think/Session.php index df620e90..0464044c 100644 --- a/library/think/Session.php +++ b/library/think/Session.php @@ -32,9 +32,9 @@ class Session /** * session初始化 - * * @param array $config * @return void + * @throws \think\Exception */ public static function init(array $config = []) { @@ -99,12 +99,9 @@ class Session /** * session设置 * - * @param string $name - * session名称 - * @param mixed $value - * session值 - * @param string $prefix - * 作用域(前缀) + * @param string $name session名称 + * @param mixed $value session值 + * @param string $prefix 作用域(前缀) * @return void */ public static function set($name, $value = '', $prefix = '') @@ -128,10 +125,8 @@ class Session /** * session获取 * - * @param string $name - * session名称 - * @param string $prefix - * 作用域(前缀) + * @param string $name session名称 + * @param string $prefix 作用域(前缀) * @return mixed */ public static function get($name = '', $prefix = '') @@ -162,10 +157,8 @@ class Session /** * 删除session数据 * - * @param string $name - * session名称 - * @param string $prefix - * 作用域(前缀) + * @param string $name session名称 + * @param string $prefix 作用域(前缀) * @return void */ public static function delete($name, $prefix = '') @@ -190,8 +183,7 @@ class Session /** * 清空session数据 * - * @param string $prefix - * 作用域(前缀) + * @param string $prefix 作用域(前缀) * @return void */ public static function clear($prefix = '') @@ -207,8 +199,7 @@ class Session /** * 判断session数据 * - * @param string $name - * session名称 + * @param string $name session名称 * @param string $prefix * * @return bool diff --git a/library/think/Template.php b/library/think/Template.php index 426367ab..e2f742bf 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -321,6 +321,7 @@ class Template * @access private * @param string $content 要解析的模板内容 * @return void + * @throws \think\Exception */ private function parsePhp(&$content) { diff --git a/library/think/Url.php b/library/think/Url.php index 2fc5069a..fd7e9c21 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -20,7 +20,7 @@ class Url * @控制器/操作?参数1=值1&参数2=值2... * \\命名空间类\\方法?参数1=值1&参数2=值2... * @param string|array $vars 传入的参数,支持数组和字符串 - * @param string $suffix 伪静态后缀,默认为true表示获取配置值 + * @param string|bool $suffix 伪静态后缀,默认为true表示获取配置值 * @param boolean|string $domain 是否显示域名 或者直接传入域名 * @return string */ diff --git a/library/think/View.php b/library/think/View.php index 76be55b4..0e02fb02 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -47,6 +47,7 @@ class View * 初始化视图 * @access public * @param array $config 配置参数 + * @return object */ public static function instance(array $config = []) { @@ -61,6 +62,7 @@ class View * @access public * @param mixed $name 变量名 * @param mixed $value 变量值 + * @return View */ public function assign($name, $value = '') { diff --git a/library/think/cache/driver/Db.php b/library/think/cache/driver/Db.php index 7a350497..d1d71b58 100644 --- a/library/think/cache/driver/Db.php +++ b/library/think/cache/driver/Db.php @@ -87,7 +87,7 @@ class Db * @param string $name 缓存变量名 * @param mixed $value 存储数据 * @param integer $expire 有效时间(秒) - * @return boolen + * @return boolean */ public function set($name, $value, $expire = null) { @@ -144,7 +144,7 @@ class Db * 删除缓存 * @access public * @param string $name 缓存变量名 - * @return boolen + * @return boolean */ public function rm($name) { @@ -155,7 +155,7 @@ class Db /** * 清除缓存 * @access public - * @return boolen + * @return boolean */ public function clear() { diff --git a/library/think/cache/driver/File.php b/library/think/cache/driver/File.php index 367db0f2..6cd38dba 100644 --- a/library/think/cache/driver/File.php +++ b/library/think/cache/driver/File.php @@ -48,7 +48,7 @@ class File /** * 初始化检查 * @access private - * @return boolen + * @return boolean */ private function init() { @@ -125,7 +125,7 @@ class File * @param string $name 缓存变量名 * @param mixed $value 存储数据 * @param int $expire 有效时间 0为永久 - * @return boolen + * @return boolean */ public function set($name, $value, $expire = null) { @@ -172,7 +172,7 @@ class File * 删除缓存 * @access public * @param string $name 缓存变量名 - * @return boolen + * @return boolean */ public function rm($name) { @@ -183,7 +183,7 @@ class File * 清除缓存 * @access public * @param string $name 缓存变量名 - * @return boolen + * @return boolean */ public function clear() { diff --git a/library/think/cache/driver/Memcache.php b/library/think/cache/driver/Memcache.php index 8ac18dd7..29368eb9 100644 --- a/library/think/cache/driver/Memcache.php +++ b/library/think/cache/driver/Memcache.php @@ -30,6 +30,7 @@ class Memcache * 架构函数 * @param array $options 缓存参数 * @access public + * @throws Exception */ public function __construct($options = []) { diff --git a/library/think/cache/driver/Secache.php b/library/think/cache/driver/Secache.php index 13ac9ccd..074c3362 100644 --- a/library/think/cache/driver/Secache.php +++ b/library/think/cache/driver/Secache.php @@ -225,7 +225,7 @@ class SecacheClient public function fetch($key, &$return) { - + $locked = false; if ($this->lock(false)) { $locked = true; } @@ -275,7 +275,7 @@ class SecacheClient * * @param mixed $is_block 是否阻塞 * @access public - * @return void + * @return bool */ public function lock($is_block, $whatever = false) { @@ -287,7 +287,7 @@ class SecacheClient * 如果flock不管用,请继承本类,并重载此方法 * * @access public - * @return void + * @return bool */ public function unlock() { @@ -400,7 +400,7 @@ class SecacheClient * * @param mixed $key * @access public - * @return void + * @return mixed */ public function search($key, &$pos) { diff --git a/library/think/db/Driver.php b/library/think/db/Driver.php index b23b3fd9..82d66cf6 100644 --- a/library/think/db/Driver.php +++ b/library/think/db/Driver.php @@ -108,6 +108,8 @@ abstract class Driver /** * 连接数据库方法 * @access public + * @return resource + * @throws \think\Exception */ public function connect($config = '', $linkNum = 0, $autoConnection = false) { @@ -160,7 +162,8 @@ abstract class Driver * @param array $bind 参数绑定 * @param boolean $fetch 不执行只是获取SQL * @param boolean $master 是否在主服务器读操作 - * @return mixed + * @return array|bool|string + * @throws \think\Exception */ public function query($sql, $bind = [], $fetch = false, $master = false) { @@ -205,6 +208,7 @@ abstract class Driver * @param array $bind 参数绑定 * @param boolean $fetch 不执行只是获取SQL * @return integer + * @throws \think\Exception */ public function execute($sql, $bind = [], $fetch = false) { @@ -275,6 +279,7 @@ abstract class Driver * @access public * @param array $bind 要绑定的参数列表 * @return void + * @throws \think\Exception */ protected function bindValue(array $bind = []) { @@ -295,7 +300,7 @@ abstract class Driver /** * 启动事务 * @access public - * @return void + * @return void|false */ public function startTrans() { @@ -315,13 +320,14 @@ abstract class Driver /** * 用于非自动提交状态下面的查询提交 * @access public - * @return boolen + * @return boolean + * @throws \think\Exception */ public function commit() { if ($this->transTimes > 0) { try { - $result = $this->linkID->commit(); + $this->linkID->commit(); $this->transTimes = 0; } catch (\PDOException $e) { throw new Exception($e->getMessage()); @@ -333,13 +339,14 @@ abstract class Driver /** * 事务回滚 * @access public - * @return boolen + * @return boolean + * @throws \think\Exception */ public function rollback() { if ($this->transTimes > 0) { try { - $result = $this->linkID->rollback(); + $this->linkID->rollback(); $this->transTimes = 0; } catch (\PDOException $e) { throw new Exception($e->getMessage()); @@ -394,6 +401,7 @@ abstract class Driver /** * 设置锁机制 * @access protected + * @param bool $lock * @return string */ protected function parseLock($lock = false) @@ -957,7 +965,7 @@ abstract class Driver * @access public * @param string $fields 要插入的数据表字段名 * @param string $table 要插入的数据表名 - * @param array $option 查询数据参数 + * @param array $options 查询数据参数 * @return false | integer */ public function selectInsert($fields, $table, $options = []) @@ -1208,7 +1216,7 @@ abstract class Driver * 连接分布式服务器 * @access protected * @param boolean $master 主服务器 - * @return void + * @return resource */ protected function multiConnect($master = false) { diff --git a/library/think/db/driver/Oracle.php b/library/think/db/driver/Oracle.php index 5fc94eda..78ffb501 100644 --- a/library/think/db/driver/Oracle.php +++ b/library/think/db/driver/Oracle.php @@ -46,6 +46,8 @@ class Oracle extends Driver * @param array $bind 参数绑定 * @param boolean $fetch 不执行只是获取SQL * @return integer + * @throws \Exception + * @throws \think\Exception */ public function execute($sql, $bind = [], $fetch = false) { @@ -84,7 +86,7 @@ class Oracle extends Driver } return $this->numRows; } catch (\PDOException $e) { - throw new Exception($this->getError()); + throw new \Exception($this->getError()); } } diff --git a/library/think/db/driver/Pgsql.php b/library/think/db/driver/Pgsql.php index 961eb17a..1c38141b 100644 --- a/library/think/db/driver/Pgsql.php +++ b/library/think/db/driver/Pgsql.php @@ -77,7 +77,7 @@ class Pgsql extends Driver /** * limit分析 * @access protected - * @param mixed $lmit + * @param mixed $limit * @return string */ public function parseLimit($limit) diff --git a/library/think/log/alarm/Email.php b/library/think/log/alarm/Email.php index 0cc58332..0d9e52f0 100644 --- a/library/think/log/alarm/Email.php +++ b/library/think/log/alarm/Email.php @@ -29,7 +29,7 @@ class Email /** * 通知发送接口 * @access public - * @param string $log 日志信息 + * @param string $msg 日志信息 * @return void */ public function send($msg = '') diff --git a/library/think/log/driver/Socket.php b/library/think/log/driver/Socket.php index 807fa7bd..e8fef113 100644 --- a/library/think/log/driver/Socket.php +++ b/library/think/log/driver/Socket.php @@ -34,7 +34,7 @@ class Socket /** * 架构函数 - * @param array $options 缓存参数 + * @param array $config 缓存参数 * @access public */ public function __construct($config = []) @@ -211,8 +211,7 @@ class Socket "Content-Type: application/json;charset=UTF-8", ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //设置header - $txt = curl_exec($ch); - return true; + return curl_exec($ch); } } diff --git a/library/think/template/TagLib.php b/library/think/template/TagLib.php index ad410fb4..57c4090d 100644 --- a/library/think/template/TagLib.php +++ b/library/think/template/TagLib.php @@ -39,21 +39,21 @@ class TagLib /** * 标签库标签列表 - * @var string + * @var array * @access protected */ protected $tagList = []; /** * 标签库分析数组 - * @var string + * @var array * @access protected */ protected $parse = []; /** * 标签库是否有效 - * @var string + * @var bool * @access protected */ protected $valid = false; @@ -70,7 +70,7 @@ class TagLib /** * 架构函数 * @access public - * @param class $template 模板引擎对象 + * @param \stdClass $template 模板引擎对象 */ public function __construct($template) { diff --git a/library/traits/controller/Jump.php b/library/traits/controller/Jump.php index f40bae1a..5ed934cd 100644 --- a/library/traits/controller/Jump.php +++ b/library/traits/controller/Jump.php @@ -25,7 +25,7 @@ trait Jump * @param mixed $data 返回的数据 * @param mixed $url 跳转的URL地址 * @param mixed $wait 跳转等待时间 - * @return void + * @return mixed */ public function error($msg = '', $data = '', $url = '', $wait = 3) { @@ -39,7 +39,7 @@ trait Jump * @param mixed $data 返回的数据 * @param mixed $url 跳转的URL地址 * @param mixed $wait 跳转等待时间 - * @return void + * @return mixed */ public function success($msg = '', $data = '', $url = '', $wait = 3) { @@ -55,7 +55,7 @@ trait Jump */ public function redirect($url, $params = []) { - return Response::redirect($url, $params); + Response::redirect($url, $params); } } diff --git a/library/traits/model/Adv.php b/library/traits/model/Adv.php index 21c3d7e2..66c2b8ec 100644 --- a/library/traits/model/Adv.php +++ b/library/traits/model/Adv.php @@ -123,7 +123,7 @@ trait Adv /** * 检查乐观锁 * @access protected - * @param inteter $id 当前主键 + * @param integer $id 当前主键 * @param array $data 当前数据 * @return mixed */ @@ -217,6 +217,7 @@ trait Adv * @param array $data 数据 * @param string $type 返回类型 默认为数组 * @return mixed + * @throws \think\Exception */ public function returnResult($data, $type = 'array') { @@ -240,7 +241,7 @@ trait Adv * @access protected * @param array $resultSet 数据 * @param string $type 返回类型 默认为数组 - * @return void + * @return array */ protected function returnResultSet(&$resultSet, $type = '') { diff --git a/library/traits/model/Auto.php b/library/traits/model/Auto.php index 3c0558c6..918d75f8 100644 --- a/library/traits/model/Auto.php +++ b/library/traits/model/Auto.php @@ -469,7 +469,7 @@ trait Auto * 指定自动完成 * @access public * @param array $auto 自动完成设置 - * @return Model + * @return Auto */ public function auto($auto) { @@ -481,7 +481,7 @@ trait Auto * 指定自动验证 * @access public * @param array $validate 自动验证设置 - * @return Model + * @return Auto */ public function validate($validate) { diff --git a/tests/thinkphp/library/think/debugTest.php b/tests/thinkphp/library/think/debugTest.php index 5b5f250e..b7948ecd 100644 --- a/tests/thinkphp/library/think/debugTest.php +++ b/tests/thinkphp/library/think/debugTest.php @@ -50,7 +50,6 @@ class debugTest extends \PHPUnit_Framework_TestCase public function testRemark() { $name = "testremarkkey"; - $value = "testremarkval"; \think\Debug::remark($name); } diff --git a/tests/thinkphp/library/think/responseTest.php b/tests/thinkphp/library/think/responseTest.php index ad7925f2..4a0b4d7a 100644 --- a/tests/thinkphp/library/think/responseTest.php +++ b/tests/thinkphp/library/think/responseTest.php @@ -21,7 +21,7 @@ class responseTest extends \PHPUnit_Framework_TestCase /** * - * @var Response + * @var \think\Response */ protected $object; diff --git a/tests/thinkphp/library/think/sessionTest.php b/tests/thinkphp/library/think/sessionTest.php index 65b42906..904da398 100644 --- a/tests/thinkphp/library/think/sessionTest.php +++ b/tests/thinkphp/library/think/sessionTest.php @@ -21,7 +21,7 @@ class sessionTest extends \PHPUnit_Framework_TestCase /** * - * @var Session + * @var \think\Session */ protected $object;