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

CaldavSyncOkListener   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 25
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 6 1
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