From db96895739cc0322ffd92de309ebdbb33d46cd2d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 30 Oct 2024 18:04:08 +0800 Subject: [PATCH] =?UTF-8?q?append=20visible=20hidden=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=9A=84=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0=E5=BF=85?= =?UTF-8?q?=E9=A1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/concern/ModelRelationQuery.php | 6 +++--- src/model/concern/Conversion.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/db/concern/ModelRelationQuery.php b/src/db/concern/ModelRelationQuery.php index 1cac4c5a..ed5ee138 100644 --- a/src/db/concern/ModelRelationQuery.php +++ b/src/db/concern/ModelRelationQuery.php @@ -62,7 +62,7 @@ public function getModel() * * @return $this */ - public function hidden(array $hidden = [], bool $merge = false) + public function hidden(array $hidden, bool $merge = false) { $this->options['hidden'] = [$hidden, $merge]; @@ -77,7 +77,7 @@ public function hidden(array $hidden = [], bool $merge = false) * * @return $this */ - public function visible(array $visible = [], bool $merge = false) + public function visible(array $visible, bool $merge = false) { $this->options['visible'] = [$visible, $merge]; @@ -92,7 +92,7 @@ public function visible(array $visible = [], bool $merge = false) * * @return $this */ - public function append(array $append = [], bool $merge = false) + public function append(array $append, bool $merge = false) { $this->options['append'] = [$append, $merge]; diff --git a/src/model/concern/Conversion.php b/src/model/concern/Conversion.php index 701fa2bc..4ed9f8d8 100644 --- a/src/model/concern/Conversion.php +++ b/src/model/concern/Conversion.php @@ -147,7 +147,7 @@ public function appendRelationAttr(string $attr, array $append) * * @return $this */ - public function append(array $append = [], bool $merge = false) + public function append(array $append, bool $merge = false) { $this->append = $merge ? array_merge($this->append, $append) : $append; @@ -162,7 +162,7 @@ public function append(array $append = [], bool $merge = false) * * @return $this */ - public function hidden(array $hidden = [], bool $merge = false) + public function hidden(array $hidden, bool $merge = false) { $this->hidden = $merge ? array_merge($this->hidden, $hidden) : $hidden; @@ -177,7 +177,7 @@ public function hidden(array $hidden = [], bool $merge = false) * * @return $this */ - public function visible(array $visible = [], bool $merge = false) + public function visible(array $visible, bool $merge = false) { $this->visible = $merge ? array_merge($this->visible, $visible) : $visible;