Completed
Pull Request — master (#28)
by claudio
09:02
created

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