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

OkEvent::__construct()   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 1
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 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