Every8dMessage   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 3
cbo 0
dl 0
loc 83
ccs 14
cts 14
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A subject() 0 6 1
A content() 0 6 1
A sendTime() 0 6 1
A create() 0 4 1
1
<?php
2
3
namespace Recca0120\Every8d;
4
5
class Every8dMessage
6
{
7
    /**
8
     * The message subject.
9
     *
10
     * @var string
11
     */
12
    public $subject = null;
13
14
    /**
15
     * The message content.
16
     *
17
     * @var string
18
     */
19
    public $content;
20
21
    /**
22
     * The message send time.
23
     *
24
     * @var \Carbon\Carbon|string
25
     */
26
    public $sendTime;
27
28
    /**
29
     * Create a new message instance.
30
     *
31
     * @param string $content
32
     */
33 5
    public function __construct($content = '')
34
    {
35 5
        $this->content = $content;
36 5
    }
37
38
    /**
39
     * Set the message subject.
40
     *
41
     * @param string $subject
42
     * @return $this
43
     */
44 1
    public function subject($subject)
45
    {
46 1
        $this->subject = $subject;
47
48 1
        return $this;
49
    }
50
51
    /**
52
     * Set the message subject.
53
     *
54
     * @param string $content
55
     * @return $this
56
     */
57 1
    public function content($content)
58
    {
59 1
        $this->content = $content;
60
61 1
        return $this;
62
    }
63
64
    /**
65
     * Set the message send time.
66
     *
67
     * @param \Carbon\Carbon|string $sendTime
68
     * @return $this
69
     */
70 1
    public function sendTime($sendTime)
71
    {
72 1
        $this->sendTime = $sendTime;
73
74 1
        return $this;
75
    }
76
77
    /**
78
     * Create a new message instance.
79
     *
80
     * @param string $content
81
     * @return static
82
     */
83 1
    public static function create($content)
84
    {
85 1
        return new static($content);
86
    }
87
}
88