Completed
Push — master ( 381b4d...e69b5e )
by Nicolas
02:32
created

PostWasDeleted   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEntityId() 0 4 1
A getClassName() 0 4 1
1
<?php namespace Modules\Blog\Events;
2
3
use Modules\Media\Contracts\DeletingMedia;
4
5
class PostWasDeleted implements DeletingMedia
6
{
7
    /**
8
     * @var string
9
     */
10
    private $postClass;
11
    /**
12
     * @var int
13
     */
14
    private $postId;
15
16
    public function __construct($postId, $postClass)
17
    {
18
        $this->postClass = $postClass;
19
        $this->postId = $postId;
20
    }
21
22
    /**
23
     * Get the entity ID
24
     * @return int
25
     */
26
    public function getEntityId()
27
    {
28
        return $this->postId;
29
    }
30
31
    /**
32
     * Get the class name the imageables
33
     * @return string
34
     */
35
    public function getClassName()
36
    {
37
        return $this->postClass;
38
    }
39
}
40