top-think / top-think/think-orm
模型查询find后->toArray()无代码提示
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Description
模型查询find后->toArray()无代码提示,没有识别变量的模型对象类型
新版:
/**
* 查找单条记录.
*
* @param mixed $data 主键数据
* @param ?Closure $closure 闭包数据
*
* @throws Exception
* @throws ModelNotFoundException
* @throws DataNotFoundException
*
* @return mixed|static
*/
3.0版本:
/**
* 查找单条记录.
*
* @param mixed $data 主键数据
* @param ?Closure $closure 闭包数据
*
* @throws Exception
* @throws ModelNotFoundException
* @throws DataNotFoundException
*
* @return static|\think\Model|array|null
*/
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the model query implementation and the find() PHPDoc, then compare its return annotation with the shown newer and 3.0 versions. Reproduce the missing completion with a model query followed by toArray(); done means the intended model type is correctly recognized by the editor without regressing the documented return possibilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100