Completed
Push — master ( 1ee05e...99144a )
by Gaetano
05:13
created

BeforeStepExecutionEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 2
cbo 1
dl 0
loc 45
ccs 0
cts 21
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStep() 0 4 1
A getExecutor() 0 4 1
A replaceExecutor() 0 4 1
A replaceStep() 0 4 1
1
<?php
2
3
namespace Kaliop\eZMigrationBundle\API\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Kaliop\eZMigrationBundle\API\Value\MigrationStep;
7
use Kaliop\eZMigrationBundle\API\ExecutorInterface;
8
9
class BeforeStepExecutionEvent extends Event
10
{
11
    protected $step;
12
    protected $executor;
13
14
    public function __construct(MigrationStep $step, ExecutorInterface $executor)
15
    {
16
        $this->step = $step;
17
        $this->executor = $executor;
18
    }
19
20
    /**
21
     * @return MigrationStep
22
     */
23
    public function getStep()
24
    {
25
        return $this->step;
26
    }
27
28
    /**
29
     * @return mixed
30
     */
31
    public function getExecutor()
32
    {
33
        return $this->executor;
34
    }
35
36
    /**
37
     * Here be dragons
38
     * @param ExecutorInterface $executor
39
     */
40
    public function replaceExecutor(ExecutorInterface $executor)
41
    {
42
        $this->executor = $executor;
43
    }
44
45
    /**
46
     * Lasciate ogni speranza, voi ch'entrate
47
     * @param MigrationStep $step
48
     */
49
    public function replaceStep(MigrationStep $step)
50
    {
51
        $this->step = $step;
52
    }
53
}
54