SendGroupMessageRequest::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the slince/smartqq package.
4
 *
5
 * (c) Slince <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Slince\SmartQQ\Request;
12
13
use Slince\SmartQQ\Credential;
14
use Slince\SmartQQ\Message\Request\GroupMessage;
15
16
class SendGroupMessageRequest extends SendMessageRequest
17
{
18
    protected $uri = 'http://d1.web2.qq.com/channel/send_qun_msg2';
19
20
    public function __construct(GroupMessage $message, Credential $credential)
21
    {
22
        $parameters = array_merge([
23
            'group_uin' => $message->getGroup()->getId(),
24
        ], $this->makeMessageParameter($message, $credential));
25
        $this->setParameter('r', \GuzzleHttp\json_encode($parameters));
26
    }
27
}
28