Passed
Push — master ( 75f6ef...2d6bc8 )
by Siim
10:44
created

AbstractResponseSaveDto::getMessage()   A

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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 6.02.19
6
 * Time: 8:08
7
 */
8
9
namespace Sf4\Api\Dto\Response;
10
11
use Sf4\Api\Notification\NotificationInterface;
12
13
abstract class AbstractResponseSaveDto implements ResponseSaveDtoInterface
14
{
15
    const STATUS_OK = 'OK';
16
    const STATUS_ERROR = 'ERROR';
17
18
    const FIELD_STATUS = 'status';
19
    const FIELD_MESSAGE = 'message';
20
    const FIELD_NOTIFICATION = 'notification';
21
22
    protected $status;
23
24
    protected $message;
25
26
    /** @var NotificationInterface */
27
    protected $notification;
28
29
    public function setOkStatus()
30
    {
31
        $this->status = static::STATUS_OK;
32
    }
33
34
    public function setErrorStatus()
35
    {
36
        $this->status = static::STATUS_ERROR;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getStatus()
43
    {
44
        return $this->status;
45
    }
46
47
    /**
48
     * @param mixed $status
49
     */
50
    public function setStatus($status): void
51
    {
52
        $this->status = $status;
53
    }
54
55
    /**
56
     * @return mixed
57
     */
58
    public function getMessage()
59
    {
60
        return $this->message;
61
    }
62
63
    /**
64
     * @param mixed $message
65
     */
66
    public function setMessage($message): void
67
    {
68
        $this->message = $message;
69
    }
70
71
    /**
72
     * @return NotificationInterface
73
     */
74
    public function getNotification(): NotificationInterface
75
    {
76
        return $this->notification;
77
    }
78
79
    /**
80
     * @param NotificationInterface $notification
81
     */
82
    public function setNotification(NotificationInterface $notification): void
83
    {
84
        $this->notification = $notification;
85
    }
86
}
87