SinglePermission::getPermission()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace JhUserTest\Fixture;
4
5
use Doctrine\Common\DataFixtures\AbstractFixture;
6
use Doctrine\Common\Persistence\ObjectManager;
7
use JhUser\Entity\Permission;
8
9
/**
10
 * Class SinglePermission
11
 * @package JhUserTest\Fixture
12
 * @author Aydin Hassan <[email protected]>
13
 */
14
class SinglePermission extends AbstractFixture
15
{
16
    /**
17
     * @var Permission
18
     */
19
    protected $permission;
20
21
    /**
22
     * {inheritDoc}
23
     */
24
    public function load(ObjectManager $manager)
25
    {
26
        $this->permission = new Permission('delete');
27
        $manager->persist($this->permission);
28
        $manager->flush();
29
    }
30
31
    /**
32
     * @return Permission
33
     */
34
    public function getPermission()
35
    {
36
        return $this->permission;
37
    }
38
}
39