AbstractOnCreateEntityEventArgs   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 56
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getEntityManager() 0 4 1
A getClassName() 0 4 1
A getData() 0 4 1
A getHints() 0 4 1
1
<?php
2
3
namespace steevanb\DoctrineEvents\Doctrine\ORM\Event;
4
5
use Doctrine\Common\EventArgs;
6
use Doctrine\ORM\EntityManagerInterface;
7
8
abstract class AbstractOnCreateEntityEventArgs extends EventArgs
9
{
10
    /** @var EntityManagerInterface */
11
    protected $em;
12
13
    /** @var string */
14
    protected $className;
15
16
    /** @var array */
17
    protected $data;
18
19
    /** @var array */
20
    protected $hints;
21
22
    /**
23
     * @param EntityManagerInterface $em
24
     * @param string $className
25
     * @param array $data
26
     * @param array $hints
27
     */
28
    public function __construct(
29
        EntityManagerInterface $em,
30
        $className,
31
        array $data,
32
        array $hints
33
    ) {
34
        $this->em = $em;
35
        $this->className = $className;
36
        $this->data = $data;
37
        $this->hints = $hints;
38
    }
39
40
    /** @return EntityManagerInterface */
41
    public function getEntityManager()
42
    {
43
        return $this->em;
44
    }
45
46
    /** @return string */
47
    public function getClassName()
48
    {
49
        return $this->className;
50
    }
51
52
    /** @return array */
53
    public function getData()
54
    {
55
        return $this->data;
56
    }
57
58
    /** @return array */
59
    public function getHints()
60
    {
61
        return $this->hints;
62
    }
63
}
64