1)修改了一些注释的错误参数类型和返回类型

2)修改了一些无意义的变量名
3)本次 commit 没有逻辑上的变动
This commit is contained in:
Jinchun Yang
2016-01-29 22:28:01 +08:00
parent 58cbc8e31a
commit f6a708e1f8
29 changed files with 104 additions and 88 deletions

View File

@@ -319,7 +319,7 @@ class App
} }
// 分析 PATH_INFO // 分析 PATH_INFO
private static function parsePathinfo($config) private static function parsePathinfo(array $config)
{ {
if (isset($_GET[$config['var_pathinfo']])) { if (isset($_GET[$config['var_pathinfo']])) {
// 判断URL里面是否有兼容模式参数 // 判断URL里面是否有兼容模式参数
@@ -347,10 +347,10 @@ class App
/** /**
* URL路由检测根据PATH_INFO) * URL路由检测根据PATH_INFO)
* @access public * @access public
* @param $config * @param array $config
* @throws Exception * @throws Exception
*/ */
public static function route($config) public static function route(array $config)
{ {
// 解析PATH_INFO // 解析PATH_INFO
self::parsePathinfo($config); self::parsePathinfo($config);

View File

@@ -158,7 +158,7 @@ class Config
*/ */
public static function reset($range = '') public static function reset($range = '')
{ {
$range = $range ?: self::$range; $range = $range ?: self::$range;
true === $range ? self::$config = [] : self::$config[$range] = []; true === $range ? self::$config = [] : self::$config[$range] = [];
} }
} }

View File

@@ -21,7 +21,7 @@ class Controller
/** /**
* 前置操作方法列表 * 前置操作方法列表
* @var beforeActionList * @var array $beforeActionList
* @access protected * @access protected
*/ */
protected $beforeActionList = []; protected $beforeActionList = [];

View File

@@ -60,7 +60,7 @@ class Cookie
* *
* @param string $name cookie名称 * @param string $name cookie名称
* @param mixed $value cookie值 * @param mixed $value cookie值
* @param null $option * @param mixed $option 可选参数 可能会是 null|integer|string
* *
* @return mixed * @return mixed
* @internal param mixed $options cookie参数 * @internal param mixed $options cookie参数

View File

@@ -132,7 +132,7 @@ class Debug
/** /**
* 获取文件加载信息 * 获取文件加载信息
* @param bool $detail 是否显示详细 * @param bool $detail 是否显示详细
* @return void * @return integer|array
*/ */
public static function getFile($detail = false) public static function getFile($detail = false)
{ {

View File

@@ -36,18 +36,18 @@ class Error
/** /**
* 自定义错误处理 * 自定义错误处理
* @access public * @access public
* @param int $errno 错误类型 * @param int $error_number 错误类型
* @param string $errstr 错误信息 * @param string $error_string 错误信息
* @param string $errfile 错误文件 * @param string $error_file 错误文件
* @param int $errline 错误行数 * @param int $error_line 错误行数
* @return void * @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} 行."; $errorStr = "[{$error_number}] {$error_string} {$error_file}{$error_line} 行.";
switch ($errno) { switch ($error_number) {
case E_USER_ERROR: case E_USER_ERROR:
self::halt($errorStr, $errno); self::halt($errorStr, $error_number);
break; break;
case E_STRICT: case E_STRICT:
case E_USER_WARNING: case E_USER_WARNING:

View File

@@ -43,7 +43,7 @@ class Hook
* @param boolean $recursive 是否递归合并 * @param boolean $recursive 是否递归合并
* @return void * @return void
*/ */
public static function import($tags, $recursive = true) public static function import(array $tags, $recursive = true)
{ {
if (!$recursive) { if (!$recursive) {
// 覆盖导入 // 覆盖导入
@@ -117,7 +117,7 @@ class Hook
* @param string $class 行为类名称 * @param string $class 行为类名称
* @param string $tag 方法名(标签名) * @param string $tag 方法名(标签名)
* @param Mixed $params 传人的参数 * @param Mixed $params 传人的参数
* @return void * @return mixed
*/ */
public static function exec($class, $tag = '', &$params = null) public static function exec($class, $tag = '', &$params = null)
{ {

View File

@@ -150,6 +150,7 @@ class Model
* @param string $method 方法名称 * @param string $method 方法名称
* @param array $args 调用参数 * @param array $args 调用参数
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function __call($method, $args) public function __call($method, $args)
{ {
@@ -185,6 +186,7 @@ class Model
* @param mixed $data 要操作的数据 * @param mixed $data 要操作的数据
* @param string $type insert 或者 update * @param string $type insert 或者 update
* @return array * @return array
* @throws \think\Exception
*/ */
protected function _write_data($data, $type) protected function _write_data($data, $type)
{ {
@@ -255,6 +257,7 @@ class Model
* @param mixed $data 数据 * @param mixed $data 数据
* @param boolean $replace 是否replace * @param boolean $replace 是否replace
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function add($data = '', $replace = false) public function add($data = '', $replace = false)
{ {
@@ -332,6 +335,7 @@ class Model
* @access public * @access public
* @param mixed $data 数据 * @param mixed $data 数据
* @return boolean * @return boolean
* @throws \think\Exception
*/ */
public function save($data = '') public function save($data = '')
{ {
@@ -406,6 +410,7 @@ class Model
* @access public * @access public
* @param mixed $options 表达式 * @param mixed $options 表达式
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function delete($options = []) public function delete($options = [])
{ {
@@ -476,6 +481,7 @@ class Model
* @access public * @access public
* @param mixed $options 表达式参数 * @param mixed $options 表达式参数
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function select($options = []) 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); $this->_after_select($resultSet, $options);
if (isset($options['index'])) { if (isset($options['index'])) {
@@ -559,10 +565,10 @@ class Model
/** /**
* 数据列表读取后的处理 * 数据列表读取后的处理
* @access protected * @access protected
* @param array $data 当前数据 * @param array $resultSet 当前数据
* @return array * @return array
*/ */
protected function _read_datalist($resultSet, $options) protected function _read_data_list($resultSet, $options)
{ {
$resultSet = array_map([$this, '_read_data'], $resultSet); $resultSet = array_map([$this, '_read_data'], $resultSet);
return $resultSet; return $resultSet;
@@ -574,9 +580,9 @@ class Model
/** /**
* 获取一条记录的某个字段值 * 获取一条记录的某个字段值
* @access public * @access public
* @param string $field 字段名 * @param string $field 字段名
* @param string $spea 字段数据间隔符号 NULL返回数组 * @param null $sepa 字段数据间隔符号 NULL返回数组
* @return mixed * @return array|mixed|null
*/ */
public function getField($field, $sepa = null) public function getField($field, $sepa = null)
{ {
@@ -677,6 +683,7 @@ class Model
* @param integer $step 增长值 * @param integer $step 增长值
* @param integer $lazyTime 延时时间(s) * @param integer $lazyTime 延时时间(s)
* @return boolean * @return boolean
* @throws \think\Exception
*/ */
public function setInc($field, $step = 1, $lazyTime = 0) public function setInc($field, $step = 1, $lazyTime = 0)
{ {
@@ -705,6 +712,7 @@ class Model
* @param integer $step 减少值 * @param integer $step 减少值
* @param integer $lazyTime 延时时间(s) * @param integer $lazyTime 延时时间(s)
* @return boolean * @return boolean
* @throws \think\Exception
*/ */
public function setDec($field, $step = 1, $lazyTime = 0) public function setDec($field, $step = 1, $lazyTime = 0)
{ {
@@ -835,6 +843,7 @@ class Model
* @access public * @access public
* @param mixed $options 表达式参数 * @param mixed $options 表达式参数
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function find($options = []) public function find($options = [])
{ {
@@ -930,6 +939,7 @@ class Model
* @param mixed $data 创建数据 * @param mixed $data 创建数据
* @param string $type 状态 * @param string $type 状态
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function create($data = '', $type = '') public function create($data = '', $type = '')
{ {
@@ -1198,6 +1208,7 @@ class Model
* @access public * @access public
* @param mixed $data 数据 * @param mixed $data 数据
* @return Model * @return Model
* @throws \think\Exception
*/ */
public function data($data = '') public function data($data = '')
{ {
@@ -1308,6 +1319,7 @@ class Model
* @param mixed $union * @param mixed $union
* @param boolean $all * @param boolean $all
* @return Model * @return Model
* @throws \think\Exception
*/ */
public function union($union, $all = false) public function union($union, $all = false)
{ {

View File

@@ -28,7 +28,7 @@ class Response
* @param mixed $data 要返回的数据 * @param mixed $data 要返回的数据
* @param String $type 返回数据格式 * @param String $type 返回数据格式
* @param bool $return 是否返回数据 * @param bool $return 是否返回数据
* @return void * @return mixed
*/ */
public static function send($data = '', $type = '', $return = false) public static function send($data = '', $type = '', $return = false)
{ {
@@ -95,7 +95,7 @@ class Response
* 输出类型设置 * 输出类型设置
* @access public * @access public
* @param string $type 输出内容的格式类型 * @param string $type 输出内容的格式类型
* @return void * @return mixed
*/ */
public static function type($type = null) public static function type($type = null)
{ {
@@ -120,7 +120,7 @@ class Response
* 输出是否exit设置 * 输出是否exit设置
* @access public * @access public
* @param bool $exit 是否退出 * @param bool $exit 是否退出
* @return void * @return mixed
*/ */
public static function isExit($exit = null) public static function isExit($exit = null)
{ {
@@ -137,7 +137,7 @@ class Response
* @param integer $code 返回的code * @param integer $code 返回的code
* @param mixed $msg 提示信息 * @param mixed $msg 提示信息
* @param string $type 返回数据格式 * @param string $type 返回数据格式
* @return void * @return mixed
*/ */
public static function result($data, $code = 0, $msg = '', $type = '') public static function result($data, $code = 0, $msg = '', $type = '')
{ {
@@ -161,7 +161,7 @@ class Response
* @param mixed $data 返回的数据 * @param mixed $data 返回的数据
* @param mixed $url 跳转的URL地址 * @param mixed $url 跳转的URL地址
* @param mixed $wait 跳转等待时间 * @param mixed $wait 跳转等待时间
* @return void * @return mixed
*/ */
public static function success($msg = '', $data = '', $url = '', $wait = 3) public static function success($msg = '', $data = '', $url = '', $wait = 3)
{ {
@@ -194,7 +194,7 @@ class Response
* @param mixed $data 返回的数据 * @param mixed $data 返回的数据
* @param mixed $url 跳转的URL地址 * @param mixed $url 跳转的URL地址
* @param mixed $wait 跳转等待时间 * @param mixed $wait 跳转等待时间
* @return void * @return mixed
*/ */
public static function error($msg = '', $data = '', $url = '', $wait = 3) public static function error($msg = '', $data = '', $url = '', $wait = 3)
{ {

View File

@@ -32,9 +32,9 @@ class Session
/** /**
* session初始化 * session初始化
*
* @param array $config * @param array $config
* @return void * @return void
* @throws \think\Exception
*/ */
public static function init(array $config = []) public static function init(array $config = [])
{ {
@@ -99,12 +99,9 @@ class Session
/** /**
* session设置 * session设置
* *
* @param string $name * @param string $name session名称
* session名称 * @param mixed $value session
* @param mixed $value * @param string $prefix 作用域(前缀)
* session值
* @param string $prefix
* 作用域(前缀)
* @return void * @return void
*/ */
public static function set($name, $value = '', $prefix = '') public static function set($name, $value = '', $prefix = '')
@@ -128,10 +125,8 @@ class Session
/** /**
* session获取 * session获取
* *
* @param string $name * @param string $name session名称
* session名称 * @param string $prefix 作用域(前缀)
* @param string $prefix
* 作用域(前缀)
* @return mixed * @return mixed
*/ */
public static function get($name = '', $prefix = '') public static function get($name = '', $prefix = '')
@@ -162,10 +157,8 @@ class Session
/** /**
* 删除session数据 * 删除session数据
* *
* @param string $name * @param string $name session名称
* session名称 * @param string $prefix 作用域(前缀)
* @param string $prefix
* 作用域(前缀)
* @return void * @return void
*/ */
public static function delete($name, $prefix = '') public static function delete($name, $prefix = '')
@@ -190,8 +183,7 @@ class Session
/** /**
* 清空session数据 * 清空session数据
* *
* @param string $prefix * @param string $prefix 作用域(前缀)
* 作用域(前缀)
* @return void * @return void
*/ */
public static function clear($prefix = '') public static function clear($prefix = '')
@@ -207,8 +199,7 @@ class Session
/** /**
* 判断session数据 * 判断session数据
* *
* @param string $name * @param string $name session名称
* session名称
* @param string $prefix * @param string $prefix
* *
* @return bool * @return bool

View File

@@ -321,6 +321,7 @@ class Template
* @access private * @access private
* @param string $content 要解析的模板内容 * @param string $content 要解析的模板内容
* @return void * @return void
* @throws \think\Exception
*/ */
private function parsePhp(&$content) private function parsePhp(&$content)
{ {

View File

@@ -20,7 +20,7 @@ class Url
* @控制器/操作?参数1=值1&参数2=值2... * @控制器/操作?参数1=值1&参数2=值2...
* \\命名空间类\\方法?参数1=值1&参数2=值2... * \\命名空间类\\方法?参数1=值1&参数2=值2...
* @param string|array $vars 传入的参数,支持数组和字符串 * @param string|array $vars 传入的参数,支持数组和字符串
* @param string $suffix 伪静态后缀默认为true表示获取配置值 * @param string|bool $suffix 伪静态后缀默认为true表示获取配置值
* @param boolean|string $domain 是否显示域名 或者直接传入域名 * @param boolean|string $domain 是否显示域名 或者直接传入域名
* @return string * @return string
*/ */

View File

@@ -47,6 +47,7 @@ class View
* 初始化视图 * 初始化视图
* @access public * @access public
* @param array $config 配置参数 * @param array $config 配置参数
* @return object
*/ */
public static function instance(array $config = []) public static function instance(array $config = [])
{ {
@@ -61,6 +62,7 @@ class View
* @access public * @access public
* @param mixed $name 变量名 * @param mixed $name 变量名
* @param mixed $value 变量值 * @param mixed $value 变量值
* @return View
*/ */
public function assign($name, $value = '') public function assign($name, $value = '')
{ {

View File

@@ -87,7 +87,7 @@ class Db
* @param string $name 缓存变量名 * @param string $name 缓存变量名
* @param mixed $value 存储数据 * @param mixed $value 存储数据
* @param integer $expire 有效时间(秒) * @param integer $expire 有效时间(秒)
* @return boolen * @return boolean
*/ */
public function set($name, $value, $expire = null) public function set($name, $value, $expire = null)
{ {
@@ -144,7 +144,7 @@ class Db
* 删除缓存 * 删除缓存
* @access public * @access public
* @param string $name 缓存变量名 * @param string $name 缓存变量名
* @return boolen * @return boolean
*/ */
public function rm($name) public function rm($name)
{ {
@@ -155,7 +155,7 @@ class Db
/** /**
* 清除缓存 * 清除缓存
* @access public * @access public
* @return boolen * @return boolean
*/ */
public function clear() public function clear()
{ {

View File

@@ -48,7 +48,7 @@ class File
/** /**
* 初始化检查 * 初始化检查
* @access private * @access private
* @return boolen * @return boolean
*/ */
private function init() private function init()
{ {
@@ -125,7 +125,7 @@ class File
* @param string $name 缓存变量名 * @param string $name 缓存变量名
* @param mixed $value 存储数据 * @param mixed $value 存储数据
* @param int $expire 有效时间 0为永久 * @param int $expire 有效时间 0为永久
* @return boolen * @return boolean
*/ */
public function set($name, $value, $expire = null) public function set($name, $value, $expire = null)
{ {
@@ -172,7 +172,7 @@ class File
* 删除缓存 * 删除缓存
* @access public * @access public
* @param string $name 缓存变量名 * @param string $name 缓存变量名
* @return boolen * @return boolean
*/ */
public function rm($name) public function rm($name)
{ {
@@ -183,7 +183,7 @@ class File
* 清除缓存 * 清除缓存
* @access public * @access public
* @param string $name 缓存变量名 * @param string $name 缓存变量名
* @return boolen * @return boolean
*/ */
public function clear() public function clear()
{ {

View File

@@ -30,6 +30,7 @@ class Memcache
* 架构函数 * 架构函数
* @param array $options 缓存参数 * @param array $options 缓存参数
* @access public * @access public
* @throws Exception
*/ */
public function __construct($options = []) public function __construct($options = [])
{ {

View File

@@ -225,7 +225,7 @@ class SecacheClient
public function fetch($key, &$return) public function fetch($key, &$return)
{ {
$locked = false;
if ($this->lock(false)) { if ($this->lock(false)) {
$locked = true; $locked = true;
} }
@@ -275,7 +275,7 @@ class SecacheClient
* *
* @param mixed $is_block 是否阻塞 * @param mixed $is_block 是否阻塞
* @access public * @access public
* @return void * @return bool
*/ */
public function lock($is_block, $whatever = false) public function lock($is_block, $whatever = false)
{ {
@@ -287,7 +287,7 @@ class SecacheClient
* 如果flock不管用请继承本类并重载此方法 * 如果flock不管用请继承本类并重载此方法
* *
* @access public * @access public
* @return void * @return bool
*/ */
public function unlock() public function unlock()
{ {
@@ -400,7 +400,7 @@ class SecacheClient
* *
* @param mixed $key * @param mixed $key
* @access public * @access public
* @return void * @return mixed
*/ */
public function search($key, &$pos) public function search($key, &$pos)
{ {

View File

@@ -108,6 +108,8 @@ abstract class Driver
/** /**
* 连接数据库方法 * 连接数据库方法
* @access public * @access public
* @return resource
* @throws \think\Exception
*/ */
public function connect($config = '', $linkNum = 0, $autoConnection = false) public function connect($config = '', $linkNum = 0, $autoConnection = false)
{ {
@@ -160,7 +162,8 @@ abstract class Driver
* @param array $bind 参数绑定 * @param array $bind 参数绑定
* @param boolean $fetch 不执行只是获取SQL * @param boolean $fetch 不执行只是获取SQL
* @param boolean $master 是否在主服务器读操作 * @param boolean $master 是否在主服务器读操作
* @return mixed * @return array|bool|string
* @throws \think\Exception
*/ */
public function query($sql, $bind = [], $fetch = false, $master = false) public function query($sql, $bind = [], $fetch = false, $master = false)
{ {
@@ -205,6 +208,7 @@ abstract class Driver
* @param array $bind 参数绑定 * @param array $bind 参数绑定
* @param boolean $fetch 不执行只是获取SQL * @param boolean $fetch 不执行只是获取SQL
* @return integer * @return integer
* @throws \think\Exception
*/ */
public function execute($sql, $bind = [], $fetch = false) public function execute($sql, $bind = [], $fetch = false)
{ {
@@ -275,6 +279,7 @@ abstract class Driver
* @access public * @access public
* @param array $bind 要绑定的参数列表 * @param array $bind 要绑定的参数列表
* @return void * @return void
* @throws \think\Exception
*/ */
protected function bindValue(array $bind = []) protected function bindValue(array $bind = [])
{ {
@@ -295,7 +300,7 @@ abstract class Driver
/** /**
* 启动事务 * 启动事务
* @access public * @access public
* @return void * @return void|false
*/ */
public function startTrans() public function startTrans()
{ {
@@ -315,13 +320,14 @@ abstract class Driver
/** /**
* 用于非自动提交状态下面的查询提交 * 用于非自动提交状态下面的查询提交
* @access public * @access public
* @return boolen * @return boolean
* @throws \think\Exception
*/ */
public function commit() public function commit()
{ {
if ($this->transTimes > 0) { if ($this->transTimes > 0) {
try { try {
$result = $this->linkID->commit(); $this->linkID->commit();
$this->transTimes = 0; $this->transTimes = 0;
} catch (\PDOException $e) { } catch (\PDOException $e) {
throw new Exception($e->getMessage()); throw new Exception($e->getMessage());
@@ -333,13 +339,14 @@ abstract class Driver
/** /**
* 事务回滚 * 事务回滚
* @access public * @access public
* @return boolen * @return boolean
* @throws \think\Exception
*/ */
public function rollback() public function rollback()
{ {
if ($this->transTimes > 0) { if ($this->transTimes > 0) {
try { try {
$result = $this->linkID->rollback(); $this->linkID->rollback();
$this->transTimes = 0; $this->transTimes = 0;
} catch (\PDOException $e) { } catch (\PDOException $e) {
throw new Exception($e->getMessage()); throw new Exception($e->getMessage());
@@ -394,6 +401,7 @@ abstract class Driver
/** /**
* 设置锁机制 * 设置锁机制
* @access protected * @access protected
* @param bool $lock
* @return string * @return string
*/ */
protected function parseLock($lock = false) protected function parseLock($lock = false)
@@ -957,7 +965,7 @@ abstract class Driver
* @access public * @access public
* @param string $fields 要插入的数据表字段名 * @param string $fields 要插入的数据表字段名
* @param string $table 要插入的数据表名 * @param string $table 要插入的数据表名
* @param array $option 查询数据参数 * @param array $options 查询数据参数
* @return false | integer * @return false | integer
*/ */
public function selectInsert($fields, $table, $options = []) public function selectInsert($fields, $table, $options = [])
@@ -1208,7 +1216,7 @@ abstract class Driver
* 连接分布式服务器 * 连接分布式服务器
* @access protected * @access protected
* @param boolean $master 主服务器 * @param boolean $master 主服务器
* @return void * @return resource
*/ */
protected function multiConnect($master = false) protected function multiConnect($master = false)
{ {

View File

@@ -46,6 +46,8 @@ class Oracle extends Driver
* @param array $bind 参数绑定 * @param array $bind 参数绑定
* @param boolean $fetch 不执行只是获取SQL * @param boolean $fetch 不执行只是获取SQL
* @return integer * @return integer
* @throws \Exception
* @throws \think\Exception
*/ */
public function execute($sql, $bind = [], $fetch = false) public function execute($sql, $bind = [], $fetch = false)
{ {
@@ -84,7 +86,7 @@ class Oracle extends Driver
} }
return $this->numRows; return $this->numRows;
} catch (\PDOException $e) { } catch (\PDOException $e) {
throw new Exception($this->getError()); throw new \Exception($this->getError());
} }
} }

View File

@@ -77,7 +77,7 @@ class Pgsql extends Driver
/** /**
* limit分析 * limit分析
* @access protected * @access protected
* @param mixed $lmit * @param mixed $limit
* @return string * @return string
*/ */
public function parseLimit($limit) public function parseLimit($limit)

View File

@@ -29,7 +29,7 @@ class Email
/** /**
* 通知发送接口 * 通知发送接口
* @access public * @access public
* @param string $log 日志信息 * @param string $msg 日志信息
* @return void * @return void
*/ */
public function send($msg = '') public function send($msg = '')

View File

@@ -34,7 +34,7 @@ class Socket
/** /**
* 架构函数 * 架构函数
* @param array $options 缓存参数 * @param array $config 缓存参数
* @access public * @access public
*/ */
public function __construct($config = []) public function __construct($config = [])
@@ -211,8 +211,7 @@ class Socket
"Content-Type: application/json;charset=UTF-8", "Content-Type: application/json;charset=UTF-8",
]; ];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //设置header curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //设置header
$txt = curl_exec($ch); return curl_exec($ch);
return true;
} }
} }

View File

@@ -39,21 +39,21 @@ class TagLib
/** /**
* 标签库标签列表 * 标签库标签列表
* @var string * @var array
* @access protected * @access protected
*/ */
protected $tagList = []; protected $tagList = [];
/** /**
* 标签库分析数组 * 标签库分析数组
* @var string * @var array
* @access protected * @access protected
*/ */
protected $parse = []; protected $parse = [];
/** /**
* 标签库是否有效 * 标签库是否有效
* @var string * @var bool
* @access protected * @access protected
*/ */
protected $valid = false; protected $valid = false;
@@ -70,7 +70,7 @@ class TagLib
/** /**
* 架构函数 * 架构函数
* @access public * @access public
* @param class $template 模板引擎对象 * @param \stdClass $template 模板引擎对象
*/ */
public function __construct($template) public function __construct($template)
{ {

View File

@@ -25,7 +25,7 @@ trait Jump
* @param mixed $data 返回的数据 * @param mixed $data 返回的数据
* @param mixed $url 跳转的URL地址 * @param mixed $url 跳转的URL地址
* @param mixed $wait 跳转等待时间 * @param mixed $wait 跳转等待时间
* @return void * @return mixed
*/ */
public function error($msg = '', $data = '', $url = '', $wait = 3) public function error($msg = '', $data = '', $url = '', $wait = 3)
{ {
@@ -39,7 +39,7 @@ trait Jump
* @param mixed $data 返回的数据 * @param mixed $data 返回的数据
* @param mixed $url 跳转的URL地址 * @param mixed $url 跳转的URL地址
* @param mixed $wait 跳转等待时间 * @param mixed $wait 跳转等待时间
* @return void * @return mixed
*/ */
public function success($msg = '', $data = '', $url = '', $wait = 3) public function success($msg = '', $data = '', $url = '', $wait = 3)
{ {
@@ -55,7 +55,7 @@ trait Jump
*/ */
public function redirect($url, $params = []) public function redirect($url, $params = [])
{ {
return Response::redirect($url, $params); Response::redirect($url, $params);
} }
} }

View File

@@ -123,7 +123,7 @@ trait Adv
/** /**
* 检查乐观锁 * 检查乐观锁
* @access protected * @access protected
* @param inteter $id 当前主键 * @param integer $id 当前主键
* @param array $data 当前数据 * @param array $data 当前数据
* @return mixed * @return mixed
*/ */
@@ -217,6 +217,7 @@ trait Adv
* @param array $data 数据 * @param array $data 数据
* @param string $type 返回类型 默认为数组 * @param string $type 返回类型 默认为数组
* @return mixed * @return mixed
* @throws \think\Exception
*/ */
public function returnResult($data, $type = 'array') public function returnResult($data, $type = 'array')
{ {
@@ -240,7 +241,7 @@ trait Adv
* @access protected * @access protected
* @param array $resultSet 数据 * @param array $resultSet 数据
* @param string $type 返回类型 默认为数组 * @param string $type 返回类型 默认为数组
* @return void * @return array
*/ */
protected function returnResultSet(&$resultSet, $type = '') protected function returnResultSet(&$resultSet, $type = '')
{ {

View File

@@ -469,7 +469,7 @@ trait Auto
* 指定自动完成 * 指定自动完成
* @access public * @access public
* @param array $auto 自动完成设置 * @param array $auto 自动完成设置
* @return Model * @return Auto
*/ */
public function auto($auto) public function auto($auto)
{ {
@@ -481,7 +481,7 @@ trait Auto
* 指定自动验证 * 指定自动验证
* @access public * @access public
* @param array $validate 自动验证设置 * @param array $validate 自动验证设置
* @return Model * @return Auto
*/ */
public function validate($validate) public function validate($validate)
{ {

View File

@@ -50,7 +50,6 @@ class debugTest extends \PHPUnit_Framework_TestCase
public function testRemark() public function testRemark()
{ {
$name = "testremarkkey"; $name = "testremarkkey";
$value = "testremarkval";
\think\Debug::remark($name); \think\Debug::remark($name);
} }

View File

@@ -21,7 +21,7 @@ class responseTest extends \PHPUnit_Framework_TestCase
/** /**
* *
* @var Response * @var \think\Response
*/ */
protected $object; protected $object;

View File

@@ -21,7 +21,7 @@ class sessionTest extends \PHPUnit_Framework_TestCase
/** /**
* *
* @var Session * @var \think\Session
*/ */
protected $object; protected $object;