Passed
Branch main (a5ccba)
by Gaetano
04:40
created

MigrationAbortedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
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\Exception\MigrationAbortedException;
8
9
class MigrationAbortedEvent extends Event
10
{
11
    protected $step;
12
    protected $exception;
13
14 4
    public function __construct(MigrationStep $step, MigrationAbortedException $exception)
15
    {
16 4
        $this->step = $step;
17 4
        $this->exception = $exception;
18 4
    }
19
20
    /**
21
     * @return MigrationStep
22
     */
23 4
    public function getStep()
24
    {
25 4
        return $this->step;
26
    }
27
28
    /**
29
     * @return MigrationAbortedException
30
     */
31 4
    public function getException()
32
    {
33 4
        return $this->exception;
34
    }
35
}
36