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

TagObserver::deleted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php namespace Arcanesoft\Blog\Models\Observers;
2
3
use Arcanesoft\Blog\Models\Tag;
4
5
/**
6
 * Class     TagObserver
7
 *
8
 * @package  Arcanesoft\Blog\Models\Observers
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class TagObserver extends AbstractObserver
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Events
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Listen to the Tag saved event.
19
     *
20
     * @param  \Arcanesoft\Blog\Models\Tag  $tag
21
     */
22
    public function saved(Tag $tag)
23
    {
24
        $tag->clearCache();
25
    }
26
27
    /**
28
     * Listen to the Tag deleted event.
29
     *
30
     * @param  \Arcanesoft\Blog\Models\Tag  $tag
31
     */
32
    public function deleted(Tag $tag)
33
    {
34
        $tag->clearCache();
35
    }
36
}
37