OkEvent::__construct()   A
last analyzed

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 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace plunner\Events\Caldav;
4
5
use Illuminate\Queue\SerializesModels;
6
use plunner\Caldav;
7
use plunner\Events\Event;
8
9
class OkEvent extends Event
10
{
11
    use SerializesModels;
12
13
    /**
14
     * @var Caldav
15
     */
16
    private $calendar;
17
18
    /**
19
     * CaldavSyncOkEvent constructor.
20
     * @param Caldav $calendar
21
     */
22
    public function __construct(Caldav $calendar)
23
    {
24
        $this->calendar = clone $calendar;
25
    }
26
27
    /**
28
     * @return Caldav
29
     */
30
    public function getCalendar()
31
    {
32
        return $this->calendar;
33
    }
34
35
    /**
36
     * Get the channels the event should be broadcast on.
37
     *
38
     * @return array
39
     */
40
    public function broadcastOn()
41
    {
42
        return [];
43
    }
44
}
45