GetUsersByConstraintResponse::getCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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
16
/**
17
 *
18
 */
19 View Code Duplication
class GetUsersByConstraintResponse 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...
20
{
21
    /**
22
     * @var integer
23
     */
24
    protected $GetUsersByConstraintResult;
25
26
    /**
27
     * @var s\tdClass
28
     */
29
    protected $ResultIDs;
30
31
    /**
32
     *
33
     */
34 1
    public function __construct()
35
    {
36 1
        $this->GetUsersByConstraintResult = Response::ERROR_NORESULT;
37 1
        $this->ResultIDs = new \stdClass;
0 ignored issues
show
Documentation Bug introduced by
It seems like new \stdClass() of type object<stdClass> is incompatible with the declared type object<Mediapart\Selligent\Response\s\tdClass> of property $ResultIDs.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
38 1
        $this->ResultIDs->int = [];
39 1
    }
40
41
    /**
42
     * {@inheritDoc}
43
     */
44 1
    public function getCode()
45
    {
46 1
        return $this->GetUsersByConstraintResult;
47
    }
48
49
    /**
50
     * @return integer[]
51
     */
52 1
    public function getIds()
53
    {
54 1
        return $this->ResultIDs->int;
55
    }
56
}
57