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

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