Skip to content

Commit ea08c17

Browse files
committed
完善注释
1 parent 85a2e68 commit ea08c17

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/db/BaseQuery.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ public function delete($data = null): int
14541454
* @throws ModelNotFoundException
14551455
* @throws DataNotFoundException
14561456
*
1457-
* @return Collection|array|static[]
1457+
* @return Collection<static>
14581458
*/
14591459
public function select(array $data = []): Collection
14601460
{
@@ -1485,13 +1485,13 @@ public function select(array $data = []): Collection
14851485
* 查找单条记录.
14861486
*
14871487
* @param mixed $data 主键数据
1488-
* @param Closure $closure 闭包数据
1488+
* @param ?Closure $closure 闭包数据
14891489
*
14901490
* @throws Exception
14911491
* @throws ModelNotFoundException
14921492
* @throws DataNotFoundException
14931493
*
1494-
* @return mixed
1494+
* @return mixed|static
14951495
*/
14961496
public function find($data = null, ?Closure $closure = null)
14971497
{

src/model/concern/DbConnect.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function setDb($db)
3535
public function getQuery()
3636
{
3737
$db = $this->initDb()->newQuery();
38-
38+
3939
if ($this->getOption('cache')) {
4040
[$key, $expire, $tag] = $this->getOption('cache');
4141
$db->cache($key, $expire, $tag);
@@ -52,8 +52,7 @@ public function getQuery()
5252

5353
/**
5454
* 初始化数据库连接对象.
55-
*
56-
* @return void
55+
* @return Query
5756
*/
5857
private function initDb()
5958
{
@@ -213,5 +212,5 @@ public function __call($method, $args)
213212
}
214213

215214
return call_user_func_array([$this->db(), $method], $args);
216-
}
215+
}
217216
}

0 commit comments

Comments
 (0)