Skip to content

Commit db96895

Browse files
committed
append visible hidden方法的第一个参数必须
1 parent 5f00adb commit db96895

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/db/concern/ModelRelationQuery.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getModel()
6262
*
6363
* @return $this
6464
*/
65-
public function hidden(array $hidden = [], bool $merge = false)
65+
public function hidden(array $hidden, bool $merge = false)
6666
{
6767
$this->options['hidden'] = [$hidden, $merge];
6868

@@ -77,7 +77,7 @@ public function hidden(array $hidden = [], bool $merge = false)
7777
*
7878
* @return $this
7979
*/
80-
public function visible(array $visible = [], bool $merge = false)
80+
public function visible(array $visible, bool $merge = false)
8181
{
8282
$this->options['visible'] = [$visible, $merge];
8383

@@ -92,7 +92,7 @@ public function visible(array $visible = [], bool $merge = false)
9292
*
9393
* @return $this
9494
*/
95-
public function append(array $append = [], bool $merge = false)
95+
public function append(array $append, bool $merge = false)
9696
{
9797
$this->options['append'] = [$append, $merge];
9898

src/model/concern/Conversion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function appendRelationAttr(string $attr, array $append)
147147
*
148148
* @return $this
149149
*/
150-
public function append(array $append = [], bool $merge = false)
150+
public function append(array $append, bool $merge = false)
151151
{
152152
$this->append = $merge ? array_merge($this->append, $append) : $append;
153153

@@ -162,7 +162,7 @@ public function append(array $append = [], bool $merge = false)
162162
*
163163
* @return $this
164164
*/
165-
public function hidden(array $hidden = [], bool $merge = false)
165+
public function hidden(array $hidden, bool $merge = false)
166166
{
167167
$this->hidden = $merge ? array_merge($this->hidden, $hidden) : $hidden;
168168

@@ -177,7 +177,7 @@ public function hidden(array $hidden = [], bool $merge = false)
177177
*
178178
* @return $this
179179
*/
180-
public function visible(array $visible = [], bool $merge = false)
180+
public function visible(array $visible, bool $merge = false)
181181
{
182182
$this->visible = $merge ? array_merge($this->visible, $visible) : $visible;
183183

0 commit comments

Comments
 (0)