AndroidMessage   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPayload() 0 6 1
A getPayload() 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\Type;
14
15
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\AndroidPayloadInterface;
16
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\CommonPayloadInterface;
17
18
/**
19
 * AndroidMessage.
20
 *
21
 * @author Artem Henvald <[email protected]>
22
 */
23
class AndroidMessage extends AbstractMessage
24
{
25
    /**
26
     * @param AndroidPayloadInterface $payload
27
     *
28
     * @return $this
29
     */
30
    public function setPayload(AndroidPayloadInterface $payload): self
31
    {
32
        $this->payload = $payload;
33
34
        return $this;
35
    }
36
37
    /**
38
     * @return AndroidPayloadInterface|CommonPayloadInterface
39
     */
40
    public function getPayload(): AndroidPayloadInterface
41
    {
42
        return $this->payload;
43
    }
44
}
45