Code Duplication    Length = 10-11 lines in 2 locations

src/Entity/CapturesResponse.php 1 location

@@ 31-40 (lines=10) @@
28
     *
29
     * @return Segment[]
30
     */
31
    public function getMatchedSegments()
32
    {
33
        $ret = [];
34
        $segments = $this->getEntityValue('matched_segments', []);
35
        foreach ($segments as $segment) {
36
            $ret[] = new Segment($segment);
37
        }
38
39
        return $ret;
40
    }
41
}
42

src/Entity/DecideResponse.php 1 location

@@ 59-69 (lines=11) @@
56
     *
57
     * @return Segment[]
58
     */
59
    public function getMatchedSegments()
60
    {
61
        $lwr = $this->getLiftWebResponse();
62
        $ret = [];
63
        $segments = $lwr->getEntityValue('segments', []);
64
        foreach ($segments as $segment) {
65
            $ret[] = new Segment($segment);
66
        }
67
68
        return $ret;
69
    }
70
71
    /**
72
     * gets the 'set_do_not_track' parameter.