Completed
Push — master ( f90be5...f5f5c6 )
by ARCANEDEV
17s
created

DeleteSeoData::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
crap 6
1
<?php namespace Arcanesoft\Blog\Listeners\Posts;
2
3
use Arcanesoft\Blog\Events\Posts\PostDeleting;
4
5
/**
6
 * Class     DeleteSeoData
7
 *
8
 * @package  Arcanesoft\Blog\Listeners\Posts
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class DeleteSeoData
12
{
13
    /* -----------------------------------------------------------------
14
     |  Main Methods
15
     | -----------------------------------------------------------------
16
     */
17
18
    /**
19
     * Handle the event.
20
     *
21
     * @param  \Arcanesoft\Blog\Events\Posts\PostDeleting  $event
22
     */
23
    public function handle(PostDeleting $event)
24
    {
25
        if ($event->post->isForceDeleting()) {
26
            $event->post->deleteSeo();
27
        }
28
    }
29
}
30