Completed
Push — master ( b2af6e...0cd744 )
by ARCANEDEV
04:46
created

CategoryObserver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 26
ccs 0
cts 6
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A saved() 0 4 1
A deleted() 0 4 1
1
<?php namespace Arcanesoft\Blog\Models\Observers;
2
3
use Arcanesoft\Blog\Models\Category;
4
5
/**
6
 * Class     CategoryObserver
7
 *
8
 * @package  Arcanesoft\Blog\Models\Observers
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class CategoryObserver extends AbstractObserver
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Events
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Listen to the Tag saved event.
19
     *
20
     * @param  \Arcanesoft\Blog\Models\Category  $category
21
     */
22
    public function saved(Category $category)
23
    {
24
        $category->clearCache();
25
    }
26
27
    /**
28
     * Listen to the Category deleted event.
29
     *
30
     * @param  \Arcanesoft\Blog\Models\Category  $category
31
     */
32
    public function deleted(Category $category)
33
    {
34
        $category->clearCache();
35
    }
36
}
37