Completed
Push — master ( 56557e...bc0eb2 )
by Julián
02:54
created

AbstractRecipient::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * Push notification services abstraction (http://github.com/juliangut/tify)
4
 *
5
 * @link https://github.com/juliangut/tify for the canonical source repository
6
 *
7
 * @license https://github.com/juliangut/tify/blob/master/LICENSE
8
 */
9
10
namespace Jgut\Tify\Recipient;
11
12
use Jgut\Tify\ParametersTrait;
13
14
abstract class AbstractRecipient
15
{
16
    use ParametersTrait;
17
18
    /**
19
     * Recipient token.
20
     *
21
     * @var string
22
     */
23
    protected $token;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param string $token
29
     * @param array  $parameters
30
     */
31
    public function __construct($token, array $parameters = [])
32
    {
33
        $this->setToken($token);
34
        $this->setParameters($parameters);
35
    }
36
37
    /**
38
     * Get token.
39
     *
40
     * @return string
41
     */
42
    final public function getToken()
43
    {
44
        return $this->token;
45
    }
46
47
    /**
48
     * Set token.
49
     *
50
     * @param string $token
51
     */
52
    abstract public function setToken($token);
53
}
54