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

DeleteSeoData   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
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 19
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 2
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