Upgrade to 3.9.7
This commit is contained in:
@@ -189,8 +189,12 @@ class Query
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function fetch(string|Closure $fetch): static
|
||||
public function fetch(string|callable|Closure $fetch): static
|
||||
{
|
||||
if (is_callable($fetch) === true) {
|
||||
$fetch = Closure::fromCallable($fetch);
|
||||
}
|
||||
|
||||
$this->fetch = $fetch;
|
||||
return $this;
|
||||
}
|
||||
@@ -623,7 +627,7 @@ class Query
|
||||
/**
|
||||
* Selects only one row from a table
|
||||
*/
|
||||
public function first(): object|array|false
|
||||
public function first(): mixed
|
||||
{
|
||||
return $this->query($this->offset(0)->limit(1)->build('select'), [
|
||||
'fetch' => $this->fetch,
|
||||
@@ -635,7 +639,7 @@ class Query
|
||||
/**
|
||||
* Selects only one row from a table
|
||||
*/
|
||||
public function row(): object|array|false
|
||||
public function row(): mixed
|
||||
{
|
||||
return $this->first();
|
||||
}
|
||||
@@ -643,7 +647,7 @@ class Query
|
||||
/**
|
||||
* Selects only one row from a table
|
||||
*/
|
||||
public function one(): object|array|false
|
||||
public function one(): mixed
|
||||
{
|
||||
return $this->first();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user