Completed
Pull Request — master (#90)
by Arnaud
03:09 queued 01:17
created

AdminInjectedEvent::getAdmin()   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 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace LAG\AdminBundle\Admin\Event;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class AdminInjectedEvent extends Event
9
{
10
    /**
11
     * @var AdminInterface
12
     */
13
    protected $admin;
14
    
15
    /**
16
     * @var mixed
17
     */
18
    protected $controller;
19
    
20 1
    public function __construct(AdminInterface $admin, $controller)
21
    {
22 1
        $this->admin = $admin;
23 1
        $this->controller = $controller;
24 1
    }
25
    
26
    /**
27
     * @return AdminInterface
28
     */
29 1
    public function getAdmin()
30
    {
31 1
        return $this->admin;
32
    }
33
    
34
    /**
35
     * @return mixed
36
     */
37 1
    public function getController()
38
    {
39 1
        return $this->controller;
40
    }
41
}
42