Completed
Push — 5.3 ( d18aef...16c32d )
by Jeroen
15:04 queued 08:59
created

DeepCloneAndSaveEvent::getEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Kunstmaan\AdminBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
/**
8
 * This event wil be used to pass metadata when the deep clone event is triggered.
9
 */
10
class DeepCloneAndSaveEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
11
{
12
    /**
13
     * @var mixed
14
     */
15
    private $entity;
16
17
    /**
18
     * @var mixed
19
     */
20
    private $clonedEntity;
21
22
    /**
23
     * @param mixed $entity       The origin entity
24
     * @param mixed $clonedEntity The cloned entity
25
     */
26 3
    public function __construct($entity, $clonedEntity)
27
    {
28 3
        $this->entity = $entity;
29 3
        $this->clonedEntity = $clonedEntity;
30 3
    }
31
32
    /**
33
     * @param mixed $clonedEntity
34
     *
35
     * @return DeepCloneAndSaveEvent
36
     */
37 1
    public function setClonedEntity($clonedEntity)
38
    {
39 1
        $this->clonedEntity = $clonedEntity;
40
41 1
        return $this;
42
    }
43
44
    /**
45
     * @return mixed
46
     */
47 3
    public function getClonedEntity()
48
    {
49 3
        return $this->clonedEntity;
50
    }
51
52
    /**
53
     * @param mixed $entity
54
     *
55
     * @return DeepCloneAndSaveEvent
56
     */
57 1
    public function setEntity($entity)
58
    {
59 1
        $this->entity = $entity;
60
61 1
        return $this;
62
    }
63
64
    /**
65
     * @return mixed
66
     */
67 3
    public function getEntity()
68
    {
69 3
        return $this->entity;
70
    }
71
}
72