Completed
Push — master ( 201fcc...39022b )
by claudio
05:44
created

OkEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 36
ccs 5
cts 7
cp 0.7143
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCompany() 0 4 1
A broadcastOn() 0 4 1
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 OkEvent extends Event
11
{
12
    use SerializesModels;
13
14
    /**
15
     * @var Company
16
     */
17
    private $company;
18
19
    /**
20
     * OkEvent constructor.
21
     * @param Company $company
22
     */
23 2
    public function __construct(Company $company)
24
    {
25 2
        $this->company = clone $company;
26 2
    }
27
28
    /**
29
     * @return Company
30
     */
31 2
    public function getCompany()
32
    {
33 2
        return $this->company;
34
    }
35
36
    /**
37
     * Get the channels the event should be broadcast on.
38
     *
39
     * @return array
40
     */
41
    public function broadcastOn()
42
    {
43
        return [];
44
    }
45
}
46