Completed
Pull Request — develop (#14)
by Rimas
03:51
created

TimestampResult   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 52
loc 52
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getFields() 7 7 1
A getStatus() 4 4 1
A setStatus() 4 4 1
A getFile() 4 4 1
A setFile() 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
4
namespace Isign\Document;
5
6
use Isign\ResultInterface;
7
8 View Code Duplication
class TimestampResult implements ResultInterface
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...
9
{
10
    /** @var string response status */
11
    private $status;
12
13
    /** @var  array file */
14
    private $file;
15
16
    /**
17
     * Fields expected in response
18
     * @return array
19
     */
20 2
    public function getFields()
21
    {
22
        return [
23 2
            'status',
24
            'file'
25
        ];
26
    }
27
28
    /**
29
     * @return string
30
     */
31 1
    public function getStatus()
32
    {
33 1
        return $this->status;
34
    }
35
36
    /**
37
     * @param string $status
38
     */
39 1
    public function setStatus($status)
40
    {
41 1
        $this->status = $status;
42 1
    }
43
44
    /**
45
     * @return array
46
     */
47 1
    public function getFile()
48
    {
49 1
        return $this->file;
50
    }
51
52
    /**
53
     * @param array $file
54
     */
55 1
    public function setFile($file)
56
    {
57 1
        $this->file = $file;
58 1
    }
59
}
60