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

MigrationSuspendedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 27
loc 27
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 5 5 1
A getStep() 4 4 1
A getException() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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\MigrationSuspendedException;
8
9 View Code Duplication
class MigrationSuspendedEvent extends Event
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    protected $step;
12
    protected $exception;
13
14
    public function __construct(MigrationStep $step, MigrationSuspendedException $exception)
15
    {
16
        $this->step = $step;
17
        $this->exception = $exception;
18
    }
19
20
    /**
21
     * @return MigrationStep
22
     */
23
    public function getStep()
24
    {
25
        return $this->step;
26
    }
27
28
    /**
29
     * @return MigrationSuspendedException
30
     */
31
    public function getException()
32
    {
33
        return $this->exception;
34
    }
35
}
36