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

LifecycleEventArgs   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 20
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntityManager() 0 3 1
A getEntity() 0 3 1
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