SendGroupMessageRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
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