Skip to content

Commit

Permalink
append visible hidden方法的第一个参数必须
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Oct 30, 2024
1 parent 5f00adb commit db96895
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/db/concern/ModelRelationQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand All @@ -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];

Expand All @@ -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];

Expand Down
6 changes: 3 additions & 3 deletions src/model/concern/Conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit db96895

Please sign in to comment.