Completed
Pull Request — master (#90)
by Arnaud
05:12 queued 02:13
created

AdminInjectedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 34
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAdmin() 0 4 1
A getController() 0 4 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 2
    public function __construct(AdminInterface $admin, $controller)
21
    {
22 2
        $this->admin = $admin;
23 2
        $this->controller = $controller;
24 2
    }
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