Completed
Push — master ( 611a4d...0d4705 )
by Artem
11:18 queued 04:23
created

AbstractMessage   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 56
rs 10
c 0
b 0
f 0
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\Options\OptionsInterface;
16
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Payload\CommonPayloadInterface;
17
use Fresh\FirebaseCloudMessagingBundle\Message\Part\Target\TargetInterface;
18
19
/**
20
 * AbstractMessage.
21
 *
22
 * @author Artem Henvald <[email protected]>
23
 */
24
abstract class AbstractMessage
25
{
26
    protected TargetInterface $target;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
27
28
    protected OptionsInterface $options;
29
30
    protected CommonPayloadInterface $payload;
31
32
    /**
33
     * @param TargetInterface $target
34
     *
35
     * @return $this
36
     */
37
    public function setTarget(TargetInterface $target): self
38
    {
39
        $this->target = $target;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @return TargetInterface
46
     */
47
    public function getTarget(): TargetInterface
48
    {
49
        return $this->target;
50
    }
51
52
    /**
53
     * @param OptionsInterface $options
54
     *
55
     * @return $this
56
     */
57
    public function setOptions(OptionsInterface $options): self
58
    {
59
        $this->options = $options;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return OptionsInterface
66
     */
67
    public function getOptions(): OptionsInterface
68
    {
69
        return $this->options;
70
    }
71
72
    /**
73
     * @return CommonPayloadInterface
74
     */
75
    abstract public function getPayload();
76
}
77