代码规范

This commit is contained in:
thinkphp
2016-05-25 21:55:57 +08:00
parent afa64cfd21
commit 0bffec6aaa
3 changed files with 36 additions and 35 deletions

View File

@@ -907,7 +907,8 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
* @param array $alias 别名定义 * @param array $alias 别名定义
* @return \think\db\Query|string * @return \think\db\Query|string
*/ */
public function hasManyThrough($model,$through,$foreignKey='',$throughKey='',$localKey='',$alias=[]){ public function hasManyThrough($model, $through, $foreignKey = '', $throughKey = '', $localKey = '', $alias = [])
{
// 记录当前关联信息 // 记录当前关联信息
$model = $this->parseModel($model); $model = $this->parseModel($model);
$through = $this->parseModel($through); $through = $this->parseModel($through);

View File

@@ -512,7 +512,8 @@ abstract class Connection
* @param bool|string $class true 返回PDOStatement 字符串用于指定返回的类名 * @param bool|string $class true 返回PDOStatement 字符串用于指定返回的类名
* @return array * @return array
*/ */
protected function procedure($class){ protected function procedure($class)
{
$item = []; $item = [];
do { do {
$result = $this->getResult($class); $result = $this->getResult($class);

View File

@@ -25,7 +25,6 @@ class Relation
const BELONGS_TO = 3; const BELONGS_TO = 3;
const BELONGS_TO_MANY = 4; const BELONGS_TO_MANY = 4;
// 父模型对象 // 父模型对象
protected $parent; protected $parent;
/** @var Model 当前关联的模型类 */ /** @var Model 当前关联的模型类 */