diff --git a/library/think/Model.php b/library/think/Model.php index 9d75e591..d945b3bb 100644 --- a/library/think/Model.php +++ b/library/think/Model.php @@ -684,6 +684,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess * 命名范围 * @access public * @param string|Closure $name 命名范围名称 逗号分隔 + * @param mixed $params 参数调用 * @return \think\Model */ public static function scope($name, $params = []) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 9826c08d..35948b93 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -788,23 +788,6 @@ class Query return isset($this->bind[$key]); } - /** - * 调用命名范围 - * @access public - * @param Closure $scope 命名范围 闭包定义 - * @param mixed $args 参数 - * @return $this - */ - public function scope($scope = '', $args = null) - { - if ($scope instanceof \Closure) { - call_user_func_array($scope, [ & $this, $args]); - } elseif ($scope instanceof Query) { - return $scope; - } - return $this; - } - /** * 查询参数赋值 * @access public