From 2aec2afc598688612b25f571e0abca60b9491451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sat, 1 Apr 2023 16:03:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActiveQuery.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ActiveQuery.php b/ActiveQuery.php index ceb44d3..23df5d1 100644 --- a/ActiveQuery.php +++ b/ActiveQuery.php @@ -122,18 +122,12 @@ class ActiveQuery extends Component implements ISqlBuilder return $this; } - /** - * @param $name - * @return $this - */ - public function with($name): static + /** + * @param array $name + * @return $this + */ + public function with(array $name): static { - if (empty($name)) { - return $this; - } - if (is_string($name)) { - $name = explode(',', $name); - } foreach ($name as $val) { $this->with[] = $val; }