ArrayJob   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getIdentifier() 0 4 1
A payload() 0 4 1
1
<?php
2
namespace Wandu\Q\Adapter;
3
4
use Wandu\Q\Contracts\AdapterJob;
5
6
class ArrayJob implements AdapterJob
7
{
8
    /** @var string */
9
    protected $identifier;
10
11
    /** @var string */
12
    protected $payload;
13
14 3
    public function __construct($identifier, $payload)
15
    {
16 3
        $this->identifier = $identifier;
17 3
        $this->payload = $payload;
18 3
    }
19
20
    /**
21
     * @return string
22
     */
23 1
    public function getIdentifier()
24
    {
25 1
        return $this->identifier;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31 3
    public function payload(): string
32
    {
33 3
        return $this->payload;
34
    }
35
}
36