Completed
Pull Request — master (#8105)
by
unknown
10:29
created

LifecycleEventArgs::getEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Event;
6
7
use Doctrine\Common\Persistence\Event\LifecycleEventArgs as BaseLifecycleEventArgs;
8
use Doctrine\ORM\EntityManagerInterface;
9
10
/**
11
 * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions
12
 * of entities.
13
 *
14
 * @link   www.doctrine-project.org
15
 */
16
class LifecycleEventArgs extends BaseLifecycleEventArgs
17
{
18
    /**
19
     * Retrieves associated Entity.
20
     *
21
     * @return object
22
     */
23
    public function getEntity()
24
    {
25
        return $this->getObject();
26
    }
27
28
    /**
29
     * Retrieves associated EntityManager.
30
     *
31
     * @return EntityManagerInterface
32
     */
33
    public function getEntityManager()
34
    {
35
        return $this->getObjectManager();
36
    }
37
}
38