Optin   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRef() 0 4 1
A create() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Kerox\Messenger\Model\Callback;
6
7
class Optin
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $ref;
13
14
    /**
15
     * Optin constructor.
16
     */
17 1
    public function __construct(string $ref)
18
    {
19 1
        $this->ref = $ref;
20 1
    }
21
22 1
    public function getRef(): string
23
    {
24 1
        return $this->ref;
25
    }
26
27
    /**
28
     * @return \Kerox\Messenger\Model\Callback\Optin
29
     */
30 1
    public static function create(array $callbackData): self
31
    {
32 1
        return new self($callbackData['ref']);
33
    }
34
}
35