1 | <?php |
||
2 | |||
3 | namespace Freyo\MtaH5\Custom; |
||
4 | |||
5 | use Freyo\MtaH5\Kernel\BaseClient; |
||
6 | |||
7 | class Client extends BaseClient |
||
8 | { |
||
9 | /** |
||
10 | * 按天查询自定义事件的pv\uv\vv\iv. |
||
11 | * |
||
12 | * @see https://mta.qq.com/docs/h5_api.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BA%8B%E4%BB%B6 |
||
13 | * |
||
14 | * @param string $startDate 开始时间(Y-m-d) |
||
15 | * @param string $endDate 结束时间(Y-m-d) |
||
16 | * @param array|string $custom 自定义事件ID |
||
17 | * |
||
18 | * @throws \Freyo\MtaH5\Kernel\Exceptions\InvalidConfigException |
||
19 | * |
||
20 | * @return array|\Freyo\MtaH5\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||
21 | */ |
||
22 | public function query($startDate, $endDate, $custom) |
||
23 | { |
||
24 | $params = [ |
||
25 | 'start_date' => $startDate, |
||
26 | 'end_date' => $endDate, |
||
27 | 'custom' => implode((array) $custom, ','), |
||
0 ignored issues
–
show
|
|||
28 | 'idx' => 'pv,uv,vv,iv', |
||
29 | ]; |
||
30 | |||
31 | return $this->httpGet('ctr_custom', $params); |
||
32 | } |
||
33 | } |
||
34 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.