Completed
Pull Request — master (#7)
by Nick
14:05
created

CapturesResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getError() 0 4 1
A getMatchedSegments() 0 10 2
1
<?php
2
3
namespace Acquia\LiftClient\Entity;
4
5
class CapturesResponse extends CapturesBase
6
{
7
    /**
8
     * Gets the 'error' parameter.
9
     *
10
     * @return string
11
     */
12
    public function getError()
13
    {
14
        return $this->getEntityValue('error', '');
15
    }
16
17
    /**
18
     * Gets the 'matched_segments' parameter.
19
     *
20
     * @return Segment[]
21
     */
22
    public function getMatchedSegments()
23
    {
24
        $ret = [];
25
        $segments = $this->getEntityValue('matched_segments', []);
26
        foreach ($segments as $segment) {
27
            $ret[] = new Segment($segment);
28
        }
29
30
        return $ret;
31
    }
32
}
33