Receiver::getTopic()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
/*
6
 * This file is part of the AppleApnPush package
7
 *
8
 * (c) Vitaliy Zhuk <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code
12
 */
13
14
namespace Apple\ApnPush\Model;
15
16
/**
17
 * The receiver model.
18
 * Store device token and topic (application).
19
 */
20
class Receiver
21
{
22
    /**
23
     * @var DeviceToken
24
     */
25
    private $token;
26
27
    /**
28
     * @var string
29
     */
30
    private $topic;
31
32
    /**
33
     * Constructor.
34
     *
35
     * @param DeviceToken $token
36
     * @param string      $topic
37
     */
38
    public function __construct(DeviceToken $token, string $topic)
39
    {
40
        $this->token = $token;
41
        $this->topic = $topic;
42
    }
43
44
    /**
45
     * Get token
46
     *
47
     * @return DeviceToken
48
     */
49
    public function getToken(): DeviceToken
50
    {
51
        return $this->token;
52
    }
53
54
    /**
55
     * Get topic
56
     *
57
     * @return string
58
     */
59
    public function getTopic(): string
60
    {
61
        return $this->topic;
62
    }
63
}
64