Completed
Push — master ( 2177e1...7159f1 )
by claudio
04:52
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\Caldav;
4
5
use plunner\Events\Event;
6
use plunner\Caldav;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
9
10
class OkEvent extends Event
11
{
12
    use SerializesModels;
13
14
    /**
15
     * @var Caldav
16
     */
17
    private $calendar;
18
19
    /**
20
     * CaldavSyncOkEvent constructor.
21
     * @param Caldav $calendar
22
     */
23
    public function __construct(Caldav $calendar)
24
    {
25
        $this->calendar = clone $calendar;
26
    }
27
28
    /**
29
     * @return Caldav
30
     */
31
    public function getCalendar()
32
    {
33
        return $this->calendar;
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