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

BeforeStepExecutionEvent::getStep()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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