HNSHA   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
dl 36
loc 36
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
ccs 10
cts 12
cp 0.8333
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 16 16 1
A getName() 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 Fhp\Segment;
4
5
use Fhp\DataTypes\Kik;
6
7
/**
8
 * Class HNSHA (Signaturabschluss)
9
 * Segment type: Administration
10
 *
11
 * @link: http://www.hbci-zka.de/dokumente/spezifikation_deutsch/fintsv3/FinTS_3.0_Security_Sicherheitsverfahren_HBCI_Rel_20130718_final_version.pdf
12
 * Section: B.5.2
13
 *
14
 * @package Fhp\Segment
15
 */
16 View Code Duplication
class HNSHA extends AbstractSegment
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...
17
{
18
    const NAME = 'HNSHA';
19
    const VERSION = 2;
20
21
    /**
22
     * HNSHA constructor.
23
     * @param int $segmentNumber
24
     * @param string $securityControlReference
25
     * @param string $pin
26
     */
27 4
    public function __construct(
28
        $segmentNumber,
29
        $securityControlReference,
30
        $pin
31
    ) {
32 4
        parent::__construct(
33 4
            static::NAME,
34 4
            $segmentNumber,
35 4
            static::VERSION,
36
            array(
37 4
                $securityControlReference,
38 4
                '',
39
                $pin
40 4
            )
41 4
        );
42 4
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName()
48
    {
49
        return static::NAME;
50
    }
51
}
52