Test Failed
Push — master ( d500d4...278979 )
by Alexander
06:17
created

TokenableEntity   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 29
ccs 8
cts 8
cp 1
rs 10
c 1
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRecipient() 0 3 1
A __construct() 0 7 1
A getTokenType() 0 3 1
A getText() 0 3 1
A getTokenData() 0 3 1
1
<?php
2
3
namespace Wearesho\Yii\Entities;
4
5
use Wearesho\Yii\Interfaces\TokenableEntityInterface;
6
7
/**
8
 * @since 1.2.2
9
 */
10
class TokenableEntity implements TokenableEntityInterface
11
{
12
    public function __construct(
13
        protected string $recipient,
14
        protected string $text,
15
        protected string $tokenType,
16
        protected array $data
17
    )
18
    {
19
    }
20
21 2
    public function getTokenData(): array
22
    {
23 2
        return $this->data;
24 2
    }
25 2
26
    public function getRecipient(): string
27 1
    {
28
        return $this->recipient;
29 1
    }
30
31
    public function getText(): string
32 1
    {
33
        return $this->text;
34 1
    }
35
36
    public function getTokenType(): string
37
    {
38
        return $this->tokenType;
39
    }
40
}
41