Code Duplication    Length = 10-10 lines in 2 locations

Filter/Widget/Dynamic/DynamicAggregateFilter.php 1 location

@@ 349-358 (lines=10) @@
346
        $value = $data->getState()->getValue();
347
        $parameters = $data->getResetUrlParameters();
348
349
        if (!empty($value)) {
350
            if ($active) {
351
                unset($value[array_search($key, $value)]);
352
                $parameters[$this->getRequestField()] = $value;
353
354
                return $parameters;
355
            }
356
357
            $parameters[$this->getRequestField()] = $value;
358
        }
359
360
        $parameters[$this->getRequestField()][$name] = $key;
361

Filter/Widget/Dynamic/MultiDynamicAggregateFilter.php 1 location

@@ 156-165 (lines=10) @@
153
        $value = $data->getState()->getValue();
154
        $parameters = $data->getResetUrlParameters();
155
156
        if (!empty($value)) {
157
            if ($active) {
158
                unset($value[$name][array_search($key, $value[$name])]);
159
                $parameters[$this->getRequestField()] = $value;
160
161
                return $parameters;
162
            }
163
164
            $parameters[$this->getRequestField()] = $value;
165
        }
166
167
        $parameters[$this->getRequestField()][$name][] = $key;
168