Completed
Push — master ( f4e7d7...63b99e )
by Giancarlos
06:02
created

Reversion   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 55.56 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 10
loc 18
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getXmlId() 10 10 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
 * Created by PhpStorm.
4
 * User: Administrador
5
 * Date: 08/08/2017
6
 * Time: 04:20 PM
7
 */
8
9
namespace Greenter\Model\Voided;
10
11
/**
12
 * Class Reversion
13
 * @package Greenter\Model\Voided
14
 */
15
class Reversion extends Voided
16
{
17
    /**
18
     * Get Id Xml.
19
     *
20
     * @return string
21
     */
22 2 View Code Duplication
    public function getXmlId()
0 ignored issues
show
Duplication introduced by
This method 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...
23
    {
24
        $parts = [
25 2
            'RR',
26 2
            $this->getFecComunicacion()->format('Ymd'),
27 2
            $this->getCorrelativo(),
28 2
        ];
29
30 2
        return join('-', $parts);
31
    }
32
}