ErrorEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
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 ErrorEvent extends Event
10
{
11
    use SerializesModels;
12
13
    /**
14
     * @var Caldav
15
     */
16
    private $calendar;
17
18
    /**
19
     * @var String
20
     */
21
    private $error;
22
23
    /**
24
     * Create a new event instance.
25
     * @param Caldav $calendar
26
     * @param String $error
27
     *
28
     */
29 6
    public function __construct(Caldav $calendar, $error)
30
    {
31 6
        $this->calendar = clone $calendar;
32 6
        $this->error = $error;
33 6
    }
34
35
    /**
36
     * @return Caldav
37
     */
38 6
    public function getCalendar()
39
    {
40 6
        return $this->calendar;
41
    }
42
43
    /**
44
     * @return String
45
     */
46 6
    public function getError()
47
    {
48 6
        return $this->error;
49
    }
50
}
51