Completed
Pull Request — master (#28)
by claudio
06:52 queued 01:55
created

OkEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

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 0
cts 12
cp 0
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
    public function __construct(Company $company)
24
    {
25
        $this->company = clone $company;
26
    }
27
28
    /**
29
     * @return Company
30
     */
31
    public function getCompany()
32
    {
33
        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