Completed
Branch master (841483)
by methylbro
02:19
created

GetUserByConstraintResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 37
loc 37
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 5 5 1
A getCode() 4 4 1
A getProperties() 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
 * This file is part of the Mediapart Selligent Client API
5
 *
6
 * CC BY-NC-SA <https://github.com/mediapart/selligent>
7
 *
8
 * For the full license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Mediapart\Selligent\Response;
13
14
use Mediapart\Selligent\Response;
15
use Mediapart\Selligent\Properties;
16
17
/**
18
 *
19
 */
20 View Code Duplication
class GetUserByConstraintResponse extends Response
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...
21
{
22
    /**
23
     * @var integer
24
     */
25
    protected $GetUserByConstraintResult;
26
27
    /**
28
     * @var Properties
29
     */
30
    protected $ResultSet;
31
32
    /**
33
     *
34
     */
35 1
    public function __construct()
36
    {
37 1
        $this->GetUserByConstraintResult = Response::ERROR_NORESULT;
38 1
        $this->ResultSet = new Properties();
39 1
    }
40
41
    /**
42
     * {@inheritDoc}
43
     */
44 1
    public function getCode()
45
    {
46 1
        return $this->GetUserByConstraintResult;
47
    }
48
49
    /**
50
     * @return Properties
51
     */
52 1
    public function getProperties()
53
    {
54 1
        return $this->ResultSet;
55
    }
56
}
57