Completed
Push — master ( 2f7a99...5fa5de )
by Matze
10:42
created

Job::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
ccs 5
cts 5
cp 1
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
namespace BrainExe\Core\MessageQueue;
4
5
use BrainExe\Core\EventDispatcher\AbstractEvent;
6
7
/**
8
 * @api can be used by other components
9
 */
10
class Job
11
{
12
13
    /**
14
     * @var AbstractEvent
15
     */
16
    public $event;
17
18
    /**
19
     * @var string
20
     */
21
    public $jobId;
22
23
    /**
24
     * @var integer
25
     */
26
    public $timestamp;
27
28
    /**
29
     * @var int
30
     */
31
    public $errorCounter = 0;
32
33
    /**
34
     * @param AbstractEvent $event
35
     * @param string $jobId
36
     * @param integer $timestamp
37
     */
38 8
    public function __construct(AbstractEvent $event, $jobId, $timestamp)
39
    {
40 8
        $this->event     = $event;
41 8
        $this->jobId     = $jobId;
42 8
        $this->timestamp = $timestamp;
43 8
    }
44
}
45