Code Duplication    Length = 10-10 lines in 2 locations

Filter/Widget/Dynamic/DynamicAggregate.php 1 location

@@ 363-372 (lines=10) @@
360
        $value = $data->getState()->getValue();
361
        $parameters = $data->getResetUrlParameters();
362
363
        if (!empty($value)) {
364
            if ($active) {
365
                unset($value[array_search($key, $value)]);
366
                $parameters[$this->getRequestField()] = $value;
367
368
                return $parameters;
369
            }
370
371
            $parameters[$this->getRequestField()] = $value;
372
        }
373
374
        $parameters[$this->getRequestField()][$name] = $key;
375

Filter/Widget/Dynamic/MultiDynamicAggregate.php 1 location

@@ 122-131 (lines=10) @@
119
        $value = $data->getState()->getValue();
120
        $parameters = $data->getResetUrlParameters();
121
122
        if (!empty($value)) {
123
            if ($active) {
124
                unset($value[$name][array_search($key, $value[$name])]);
125
                $parameters[$this->getRequestField()] = $value;
126
127
                return $parameters;
128
            }
129
130
            $parameters[$this->getRequestField()] = $value;
131
        }
132
133
        $parameters[$this->getRequestField()][$name][] = $key;
134