Completed
Push — master ( 4fc9d1...10b12e )
by claudio
04:55
created

CaldavSyncOkListener::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

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 6
ccs 0
cts 5
cp 0
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace plunner\Listeners;
4
5
use plunner\Events\CaldavSyncOkEvent;
6
use Illuminate\Queue\InteractsWithQueue;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
9
class CaldavSyncOkListener
10
{
11
    /**
12
     * Create the event listener.
13
     *
14
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
15
     */
16
    public function __construct()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Handle the event.
23
     *
24
     * @param  CaldavSyncOkEvent  $event
25
     * @return void
26
     */
27
    public function handle(CaldavSyncOkEvent $event)
28
    {
29
        //
30
        $event->getCalendar()->sync_errors = '';
31
        $event->getCalendar()->save();
32
    }
33
}
34