ArrayJob::payload()   A
last analyzed

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
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
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