Link::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 4
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace DingNotice\Messages;
4
5
class Link extends Message
6
{
7
8
    public function __construct($title,$text,$messageUrl,$picUrl = '')
9
    {
10
        $this->setMessage($title,$text,$messageUrl,$picUrl);
11
    }
12
13
    public function setMessage($title,$text,$messageUrl,$picUrl = ''){
14
        $this->message  = [
15
            'msgtype' => 'link',
16
            'link' => [
17
                'text' => $text,
18
                'title' => $title,
19
                'picUrl' => $picUrl,
20
                'messageUrl' => $messageUrl
21
            ]
22
        ];
23
    }
24
}