Completed
Push — master ( 8eb315...5aaba6 )
by Changwan
04:29
created

BeanstalkdJob::payload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
namespace Wandu\Q\Adapter;
3
4
use Pheanstalk\Job as PheanstalkJob;
5
use Wandu\Q\Contracts\AdapterJob;
6
7
class BeanstalkdJob implements AdapterJob
8
{
9
    /** @var \Pheanstalk\Job */
10
    protected $job;
11
    
12
    public function __construct(PheanstalkJob $job)
13
    {
14
        $this->job = $job;
15
    }
16
17
    /**
18
     * @return \Pheanstalk\Job
19
     */
20
    public function getJob(): PheanstalkJob
21
    {
22
        return $this->job;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function payload(): string
29
    {
30
        return $this->job->getData();
31
    }
32
}
33