GetSegmentsResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCode() 0 4 1
A getSegments() 0 4 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\ArrayOfSegmentsInfo;
16
17
/**
18
 * Gets the segments for a specific list
19
 */
20
class GetSegmentsResponse extends Response
21
{
22
    /**
23
     * @var int The result of the function
24
     */
25
    protected $GetSegmentsResult;
26
27
    /**
28
     * @var ArrayOfSegmentsInfo List of found segments
29
     */
30
    protected $segments;
31
32 1
    public function __construct()
33
    {
34 1
        $this->GetSegmentsResult = Response::ERROR_NORESULT;
35 1
        $this->segments = [];
0 ignored issues
show
Documentation Bug introduced by
It seems like array() of type array is incompatible with the declared type object<Mediapart\Selligent\ArrayOfSegmentsInfo> of property $segments.

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...
36 1
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41 1
    public function getCode()
42
    {
43 1
        return $this->GetSegmentsResult;
44
    }
45
46
    /**
47
     * @return ArrayOfSegmentsInfo List of found segments
48
     */
49 1
    public function getSegments()
50
    {
51 1
        return $this->segments;
52
    }
53
}
54