BaseSender::setSubject()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace EricMakesStuff\ServerMonitor\Notifications;
4
5
abstract class BaseSender implements SendsNotifications
6
{
7
    const TYPE_SUCCESS = 'success';
8
    const TYPE_ERROR = 'error';
9
10
    /** @var type */
11
    protected $type;
12
13
    /** @var string */
14
    protected $subject;
15
16
    /** @var string */
17
    protected $message;
18
19
    /**
20
     * @param string $type
21
     *
22
     * @return \EricMakesStuff\ServerMonitor\Notifications\SendsNotifications
23
     */
24
    public function setType($type)
25
    {
26
        $this->type = $type;
0 ignored issues
show
Documentation Bug introduced by
It seems like $type of type string is incompatible with the declared type object<EricMakesStuff\Se...tor\Notifications\type> of property $type.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
27
28
        return $this;
29
    }
30
31
    /**
32
     * @param string $subject
33
     *
34
     * @return \EricMakesStuff\ServerMonitor\Notifications\SendsNotifications
35
     */
36
    public function setSubject($subject)
37
    {
38
        $this->subject = $subject;
39
40
        return $this;
41
    }
42
43
    /**
44
     * @param string $message
45
     *
46
     * @return \EricMakesStuff\ServerMonitor\Notifications\SendsNotifications
47
     */
48
    public function setMessage($message)
49
    {
50
        $this->message = $message;
51
52
        return $this;
53
    }
54
}
55