Total Complexity | 8 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait FixDataTrait |
||
8 | { |
||
9 | /** |
||
10 | * @var integer 每次数量 |
||
11 | */ |
||
12 | protected $onceCount = 1000; |
||
13 | |||
14 | /** |
||
15 | * @var int (减轻DB负担)休眠,单位秒 |
||
16 | */ |
||
17 | protected $sleepSecond = 1; |
||
18 | |||
19 | /** |
||
20 | * 迁移数据库 |
||
21 | * @param ActiveQuery $query 查询 query |
||
22 | * @param \Closure $existCallback 检查是否存在的回调函数 |
||
23 | * @param \Closure $callback 添加、迁移数据 |
||
24 | * @param bool $userTransaction |
||
25 | * @return array 添加成功的 ID 数组 |
||
26 | * @throws \Exception |
||
27 | */ |
||
28 | private function migrate($query, \Closure $existCallback, \Closure $callback, $userTransaction = true): array |
||
57 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.