Ding::actionCard()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace DingRobot;
4
5
use DingRobot\Message\ActionCard;
6
use DingRobot\Message\ActionCardBtn;
7
use DingRobot\Message\FeedCard;
8
use DingRobot\Message\Link;
9
use DingRobot\Message\Markdown;
10
use DingRobot\Message\Text;
11
12
class Ding
13
{
14 3
    public static function actionCard($title = '')
15
    {
16 3
        return new ActionCard($title);
17
    }
18
19 3
    public static function actionCardBtn($title = '')
20
    {
21 3
        return new ActionCardBtn($title);
22
    }
23
24 4
    public static function feedCard($links = null)
25
    {
26 4
        return new FeedCard($links);
27
    }
28
29 2
    public static function link($title = '')
30
    {
31 2
        return new Link($title);
32
    }
33
34 2
    public static function markdown($title = '')
35
    {
36 2
        return new Markdown($title);
37
    }
38
39 3
    public static function text($content = '')
40
    {
41 3
        return new Text($content);
42
    }
43
}
44