Completed
Push — master ( f8a22c...480ba6 )
by ARCANEDEV
12s
created

DetachingPermissions::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php namespace Arcanedev\LaravelAuth\Listeners\PermissionGroups;
2
3
use Arcanedev\LaravelAuth\Events\PermissionsGroups\DeletingPermissionsGroup;
4
5
/**
6
 * Class     DetachingPermissions
7
 *
8
 * @package  Arcanedev\LaravelAuth\Listeners\PermissionGroups
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class DetachingPermissions
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Method
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Handle the event.
20
     *
21
     * @param  \Arcanedev\LaravelAuth\Events\PermissionsGroups\DeletingPermissionsGroup  $event
22
     */
23 3
    public function handle(DeletingPermissionsGroup $event)
24
    {
25 3
        $event->group->detachAllPermissions(false);
26 3
    }
27
}
28