These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * 获取群相关信息. |
||
4 | */ |
||
5 | use Slince\SmartQQ\Client; |
||
6 | |||
7 | include __DIR__.'/bootstrap.php'; |
||
8 | |||
9 | //创建smartQQ客户端 |
||
10 | $smartQQ = new Client(getCredential()); |
||
11 | |||
12 | //# 群信息 |
||
13 | |||
14 | //1、获取所有群 |
||
15 | $groups = $smartQQ->getGroups(); |
||
16 | |||
17 | //2、筛选出指定的群 |
||
18 | $group = $groups->firstByAttribute('name', 'Symfony.cn'); |
||
19 | |||
20 | //3、获取群的详细信息 |
||
21 | $groupDetail = $smartQQ->getGroupDetail($group); |
||
0 ignored issues
–
show
|
|||
22 | // 输出 |
||
23 | printPrettyScreen($groups->toArray()); |
||
24 | printR($group); |
||
25 | printR($group); |
||
26 | printR($groupDetail); |
||
27 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: