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

AdminAwareTrait::setAdmin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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