FailedJob::getBacktrace()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Mpclarkson\ResqueBundle;
4
5
/**
6
 * Class FailedJob
7
 * @package Mpclarkson\ResqueBundle
8
 */
9
class FailedJob
10
{
11
    /**
12
     * @var array
13
     */
14
    protected $data;
15
16
    /**
17
     * @param array $data Contains the failed job data
18
     */
19
    public function __construct(array $data)
20
    {
21
        $this->data = $data;
22
    }
23
24
    /**
25
     * @return mixed
26
     */
27
    public function getFailedAt()
28
    {
29
        return $this->data['failed_at'];
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getName()
36
    {
37
        return $this->data['payload']['class'];
38
    }
39
40
    /**
41
     * @return int
42
     */
43
    public function getId()
44
    {
45
        return $this->data['payload']['id'];
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getQueueName()
52
    {
53
        return $this->data['queue'];
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getWorkerName()
60
    {
61
        return $this->data['worker'];
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    public function getExceptionClass()
68
    {
69
        return $this->data['exception'];
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getError()
76
    {
77
        return $this->data['error'];
78
    }
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getBacktrace()
84
    {
85
        return $this->data['backtrace'];
86
    }
87
}
88