Passed
Push — master ( 498029...5a0e4e )
by Alexander
11:44
created

TokenableEntity::getTokenRecipient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Wearesho\Yii\Entities;
4
5
use Wearesho\Yii\Interfaces\TokenableEntityInterface;
6
7
/**
8
 * Class TokenableEntity
9
 * @package Wearesho\Yii\Entities
10
 *
11
 * @since 1.2.2
12
 */
13
class TokenableEntity implements TokenableEntityInterface
14
{
15
    /** @var string */
16
    protected $recipient;
17
18
    /** @var array */
19
    protected $data;
20
21 2
    public function __construct(string $recipient, array $data = [])
22
    {
23 2
        $this->recipient = $recipient;
24 2
        $this->data = $data;
25 2
    }
26
27 1
    public function getTokenRecipient(): string
28
    {
29 1
        return $this->recipient;
30
    }
31
32 1
    public function getTokenData(): array
33
    {
34 1
        return $this->data;
35
    }
36
}
37