Passed
Push — master ( eb8de1...b87f0d )
by Gaetano
07:50
created

MigrationGeneratedEvent::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Kaliop\eZMigrationBundle\API\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class MigrationGeneratedEvent extends Event
8
{
9
    protected $type;
10
    protected $mode;
11
    protected $format;
12
    protected $data;
13
    protected $file;
14
    protected $context;
15
    protected $matchCondition;
16
17
    public function __construct($type, $mode, $format, $data, $file, $matchCondition = null, $context = null)
18
    {
19
        $this->type = $type;
20
        $this->mode = $mode;
21
        $this->format = $format;
22
        $this->data = $data;
23
        $this->file = $file;
24
        $this->matchCondition = $matchCondition;
25
        $this->context = $context;
26
    }
27
28
    public function getType()
29
    {
30
        return $this->type;
31
    }
32
33
    public function getMode()
34
    {
35
        return $this->mode;
36
    }
37
38
    public function getFormat()
39
    {
40
        return $this->format;
41
    }
42
43
    public function getData()
44
    {
45
        return $this->data;
46
    }
47
48
    public function getFile()
49
    {
50
        return $this->file;
51
    }
52
53
    public function getContext()
54
    {
55
        return $this->context;
56
    }
57
58
    public function getMatchCondition()
59
    {
60
        return $this->matchCondition;
61
    }
62
63
    public function replaceData($data)
64
    {
65
        $this->data = $data;
66
    }
67
68
    public function replaceFile($fileName)
69
    {
70
        $this->file = $fileName;
71
    }
72
}
73