Completed
Push — master ( f9e78a...edb43e )
by Abdelrahman
09:22
created

AbilityHandler   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 66
rs 10
c 0
b 0
f 0
wmc 5
lcom 1
cbo 2

5 Methods

Rating   Name   Duplication   Size   Complexity  
A created() 0 4 1
A updated() 0 5 1
A deleted() 0 5 1
A attached() 0 5 1
A detached() 0 5 1
1
<?php
2
3
/*
4
 * NOTICE OF LICENSE
5
 *
6
 * Part of the Rinvex Fort Package.
7
 *
8
 * This source file is subject to The MIT License (MIT)
9
 * that is bundled with this package in the LICENSE file.
10
 *
11
 * Package: Rinvex Fort Package
12
 * License: The MIT License (MIT)
13
 * Link:    https://rinvex.com
14
 */
15
16
namespace Rinvex\Fort\Handlers;
17
18
use Rinvex\Fort\Models\Role;
19
use Rinvex\Fort\Models\User;
20
use Rinvex\Fort\Models\Ability;
21
22
class AbilityHandler
23
{
24
    /**
25
     * Listen to the Ability created event.
26
     *
27
     * @param \Rinvex\Fort\Models\Ability $ability
28
     *
29
     * @return void
30
     */
31
    public function created(Ability $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
    {
33
        //
34
    }
35
36
    /**
37
     * Listen to the Ability updated event.
38
     *
39
     * @param \Rinvex\Fort\Models\Ability $ability
40
     *
41
     * @return void
42
     */
43
    public function updated(Ability $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
44
    {
45
        Role::forgetCache();
46
        User::forgetCache();
47
    }
48
49
    /**
50
     * Listen to the Ability deleted event.
51
     *
52
     * @param \Rinvex\Fort\Models\Ability $ability
53
     *
54
     * @return void
55
     */
56
    public function deleted(Ability $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
57
    {
58
        Role::forgetCache();
59
        User::forgetCache();
60
    }
61
62
    /**
63
     * Listen to the Ability attached event.
64
     *
65
     * @param \Rinvex\Fort\Models\Ability $ability
66
     *
67
     * @return void
68
     */
69
    public function attached(Ability $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
70
    {
71
        Role::forgetCache();
72
        User::forgetCache();
73
    }
74
75
    /**
76
     * Listen to the Ability detached event.
77
     *
78
     * @param \Rinvex\Fort\Models\Ability $ability
79
     *
80
     * @return void
81
     */
82
    public function detached(Ability $ability)
0 ignored issues
show
Unused Code introduced by
The parameter $ability is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
83
    {
84
        Role::forgetCache();
85
        User::forgetCache();
86
    }
87
}
88