ErrorEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 52
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCompany() 0 4 1
A getError() 0 4 1
A broadcastOn() 0 4 1
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