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

CombinedPayload::setNotificationPayload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 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\Combined;
14
15
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\AndroidPayloadInterface;
16
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\Data\DataPayload;
17
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\IosPayloadInterface;
18
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\Notification\AbstractCommonNotificationPayload;
19
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\WebPayloadInterface;
20
21
/**
22
 * CombinedPayload.
23
 *
24
 * @author Artem Henvald <[email protected]>
25
 */
26
class CombinedPayload implements AndroidPayloadInterface, IosPayloadInterface, WebPayloadInterface
27
{
28
    /** @var DataPayload */
29
    private $dataPayload;
30
31
    /** @var AbstractCommonNotificationPayload */
32
    private $notificationPayload;
33
34
    /**
35
     * @param DataPayload $dataPayload
36
     *
37
     * @return $this
38
     */
39
    public function setDataPayload(DataPayload $dataPayload): self
40
    {
41
        $this->dataPayload = $dataPayload;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return DataPayload
48
     */
49
    public function getDataPayload(): DataPayload
50
    {
51
        return $this->dataPayload;
52
    }
53
54
    /**
55
     * @param AbstractCommonNotificationPayload $notificationPayload
56
     *
57
     * @return $this
58
     */
59
    public function setNotificationPayload(AbstractCommonNotificationPayload $notificationPayload): self
60
    {
61
        $this->notificationPayload = $notificationPayload;
62
63
        return $this;
64
    }
65
66
    /**
67
     * @return AbstractCommonNotificationPayload
68
     */
69
    public function getNotificationPayload(): AbstractCommonNotificationPayload
70
    {
71
        return $this->notificationPayload;
72
    }
73
}
74