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

MigrationGeneratedEvent   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 24
c 1
b 0
f 1
dl 0
loc 64
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getContext() 0 3 1
A replaceData() 0 3 1
A getFormat() 0 3 1
A __construct() 0 9 1
A getFile() 0 3 1
A getType() 0 3 1
A replaceFile() 0 3 1
A getData() 0 3 1
A getMatchCondition() 0 3 1
A getMode() 0 3 1
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