PostDeleteEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * File was created 28.04.2016 07:28
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Data\Events;
7
8
use PeekAndPoke\Component\Emitter\Event;
9
use Psr\Container\ContainerInterface;
10
11
/**
12
 * @author Karsten J. Gerber <[email protected]>
13
 */
14
class PostDeleteEvent implements Event
15
{
16
    public const NAME = 'POST_DELETE';
17
18
    /** @var ContainerInterface */
19
    private $provider;
20
    /** @var mixed */
21
    private $payload;
22
23
    /**
24
     * PostSaveClass constructor.
25
     *
26
     * @param ContainerInterface $provider
27
     * @param mixed              $payload
28
     */
29
    public function __construct(ContainerInterface $provider, $payload)
30
    {
31
        $this->provider = $provider;
32
        $this->payload  = $payload;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getEventName()
39
    {
40
        return static::NAME;
41
    }
42
43
    /**
44
     * @return ContainerInterface
45
     */
46
    public function getProvider()
47
    {
48
        return $this->provider;
49
    }
50
51
    /**
52
     * @return mixed
53
     */
54
    public function getPayload()
55
    {
56
        return $this->payload;
57
    }
58
}
59