ErrorEvent::getCompany()   A
last analyzed

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
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace plunner\Events\Optimise;
4
5
use Illuminate\Queue\SerializesModels;
6
use plunner\Company;
7
use plunner\Events\Event;
8
9
class ErrorEvent extends Event
10
{
11
    use SerializesModels;
12
13
    /**
14
     * @var Company
15
     */
16
    private $company;
17
18
    /**
19
     * @var String
20
     */
21
    private $error;
22
23
    /**
24
     * ErrorEvent constructor.
25
     * @param Company $company
26
     * @param String $error
27
     */
28
    public function __construct(Company $company, $error)
29
    {
30
        $this->company = clone $company;
31
        $this->error = $error;
32
    }
33
34
    /**
35
     * @return Company
36
     */
37
    public function getCompany()
38
    {
39
        return $this->company;
40
    }
41
42
    /**
43
     * @return String
44
     */
45
    public function getError()
46
    {
47
        return $this->error;
48
    }
49
50
51
    /**
52
     * Get the channels the event should be broadcast on.
53
     *
54
     * @return array
55
     */
56
    public function broadcastOn()
57
    {
58
        return [];
59
    }
60
}
61