Test Failed
Push — master ( 278979...0dec93 )
by Alexander
18:41
created

TokenableEntity   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getRecipient() 0 3 1
A __construct() 0 8 1
A getOptions() 0 3 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
        protected array $deliveryOptions = []
18
    )
19
    {
20
    }
21 2
22
    public function getTokenData(): array
23 2
    {
24 2
        return $this->data;
25 2
    }
26
27 1
    public function getRecipient(): string
28
    {
29 1
        return $this->recipient;
30
    }
31
32 1
    public function getText(): string
33
    {
34 1
        return $this->text;
35
    }
36
37
    public function getTokenType(): string
38
    {
39
        return $this->tokenType;
40
    }
41
42
    public function getOptions(): array
43
    {
44
        return $this->deliveryOptions;
45
    }
46
}
47