PostSaveEvent::getSlumberingData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
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 PostSaveEvent implements Event
15
{
16
    public const NAME = 'POST_SAVE';
17
18
    /** @var ContainerInterface */
19
    private $provider;
20
    /** @var mixed */
21
    private $payload;
22
    /** @var array */
23
    private $slumberingData;
24
25
    /**
26
     * PostSaveClass constructor.
27
     *
28
     * @param ContainerInterface $provider
29
     * @param mixed              $payload
30
     * @param array              $slumberingData
31
     */
32 4
    public function __construct(ContainerInterface $provider, $payload, $slumberingData)
33
    {
34 4
        $this->provider       = $provider;
35 4
        $this->payload        = $payload;
36 4
        $this->slumberingData = $slumberingData;
37 4
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getEventName()
43
    {
44
        return static::NAME;
45
    }
46
47
48
    /**
49
     * @return ContainerInterface
50
     */
51 4
    public function getProvider()
52
    {
53 4
        return $this->provider;
54
    }
55
56
    /**
57
     * @return mixed
58
     */
59 4
    public function getPayload()
60
    {
61 4
        return $this->payload;
62
    }
63
64
    /**
65
     * @return array
66
     */
67 4
    public function getSlumberingData()
68
    {
69 4
        return $this->slumberingData;
70
    }
71
}
72