Completed
Push — master ( 72cf95...b4fc03 )
by Artem
08:38
created

AbstractCommonNotificationPayload   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 71
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setTitle() 0 6 1
A getTitle() 0 4 1
A setBody() 0 6 1
A getBody() 0 4 1
A setClickAction() 0 6 1
A getClickAction() 0 4 1
1
<?php
2
/*
3
 * This file is part of the FirebaseCloudMessagingBundle
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\Notification;
14
15
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\CommonPayloadInterface;
16
17
/**
18
 * AbstractCommonNotificationPayload.
19
 *
20
 * @author Artem Henvald <[email protected]>
21
 */
22
abstract class AbstractCommonNotificationPayload implements CommonPayloadInterface
23
{
24
    /** @var string */
25
    private $title = '';
26
27
    /** @var string */
28
    private $body = '';
29
30
    /** @var string */
31
    private $clickAction = '';
32
33
    /**
34
     * @param string $title
35
     *
36
     * @return $this
37
     */
38
    public function setTitle(string $title): self
39
    {
40
        $this->title = $title;
41
42
        return $this;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getTitle(): string
49
    {
50
        return $this->title;
51
    }
52
53
    /**
54
     * @param string $body
55
     *
56
     * @return $this
57
     */
58
    public function setBody(string $body): self
59
    {
60
        $this->body = $body;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getBody(): string
69
    {
70
        return $this->body;
71
    }
72
73
    /**
74
     * @param string $clickAction
75
     *
76
     * @return $this
77
     */
78
    public function setClickAction(string $clickAction): self
79
    {
80
        $this->clickAction = $clickAction;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getClickAction(): string
89
    {
90
        return $this->clickAction;
91
    }
92
}
93