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

GetUsersByConstraintResponse::getCode()   A

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
use Mediapart\Selligent\Properties;
16
17
/**
18
 *
19
 */
20 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...
21
{
22
    /**
23
     * @var integer
24
     */
25
    protected $GetUsersByConstraintResult;
26
27
    /**
28
     * @var stdClass
29
     */
30
    protected $ResultIDs;
31
32
    /**
33
     *
34
     */
35 1
    public function __construct()
36
    {
37 1
        $this->GetUsersByConstraintResult = Response::ERROR_NORESULT;
38 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\stdClass> 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...
39 1
        $this->ResultIDs->int = [];
40 1
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45 1
    public function getCode()
46
    {
47 1
        return $this->GetUsersByConstraintResult;
48
    }
49
50
    /**
51
     * @return Array[integer]
0 ignored issues
show
Documentation introduced by
The doc-type Array[integer] could not be parsed: Expected "]" at position 2, but found "integer". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
52
     */
53 1
    public function getIds()
54
    {
55 1
        return $this->ResultIDs->int;
56
    }
57
}
58