Completed
Pull Request — master (#60)
by Eric
36:00
created

AbstractEvent::getAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Lug package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Lug\Bundle\ResourceBundle\Rest;
13
14
use Lug\Component\Resource\Model\ResourceInterface;
15
use Symfony\Component\EventDispatcher\Event;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
abstract class AbstractEvent extends Event
21
{
22
    /**
23
     * @var ResourceInterface
24
     */
25
    private $resource;
26
27
    /**
28
     * @var string
29
     */
30 8
    private $action;
31
32 8
    /**
33 8
     * @param ResourceInterface $resource
34
     * @param string            $action
35
     */
36
    public function __construct(ResourceInterface $resource, $action)
37
    {
38 4
        $this->resource = $resource;
39
        $this->action = $action;
40 4
    }
41
42
    /**
43
     * @return ResourceInterface
44
     */
45
    public function getResource()
46
    {
47
        return $this->resource;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getAction()
54
    {
55
        return $this->action;
56
    }
57
}
58