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

AdminAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setAdmin() 0 4 1
A getAdmin() 0 4 1
1
<?php
2
3
namespace LAG\AdminBundle\Admin\Behaviors;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
7
trait AdminAwareTrait
8
{
9
    /**
10
     * @var AdminInterface
11
     */
12
    protected $admin;
13
    
14
    /**
15
     * @param AdminInterface $admin
16
     */
17 5
    public function setAdmin(AdminInterface $admin)
18
    {
19 5
        $this->admin = $admin;
20 5
    }
21
    
22
    /**
23
     * @return AdminInterface
24
     */
25 1
    public function getAdmin()
26
    {
27 1
        return $this->admin;
28
    }
29
}
30