Code Duplication    Length = 3-4 lines in 2 locations

src/Test/Mapper.php 2 locations

@@ 55-58 (lines=4) @@
52
        if (array_key_exists($key, $this->test->data)) {
53
            $data = $this->test->data[$key];
54
            foreach ($data as $i => $v) {
55
                if (count($params) && array_intersect_assoc($params, $v) != $params) {
56
                    unset($data[$i]);
57
                    continue;
58
                }
59
                $data[$i] = (object) $v;
60
            }
61
            $data = array_values($data);
@@ 121-123 (lines=3) @@
118
        $key = $this->serviceName.'.'.$space;
119
        if (array_key_exists($key, $this->test->data)) {
120
            foreach ($this->test->data[$key] as $i => $v) {
121
                if (count($params) && array_intersect_assoc($params, $v) == $params) {
122
                    unset($this->test->data[$key][$i]);
123
                }
124
            }
125
            $this->test->data[$key] = array_values($this->test->data[$key]);
126
        }