Completed
Pull Request — master (#60)
by Eric
41:48 queued 34:12
created

AbstractEvent::getAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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
    private $action;
31
32
    /**
33
     * @param ResourceInterface $resource
34
     * @param string            $action
35
     */
36 8
    public function __construct(ResourceInterface $resource, $action)
37
    {
38 8
        $this->resource = $resource;
39 8
        $this->action = $action;
40 8
    }
41
42
    /**
43
     * @return ResourceInterface
44
     */
45 4
    public function getResource()
46
    {
47 4
        return $this->resource;
48
    }
49
50
    /**
51
     * @return string
52
     */
53 4
    public function getAction()
54
    {
55 4
        return $this->action;
56
    }
57
}
58