Code Duplication    Length = 12-12 lines in 2 locations

modules/mongodb_watchdog/src/Form/MongodbWatchdogFilterForm.php 1 location

@@ 31-42 (lines=12) @@
28
      '#title' => $this->t('Filter log messages'),
29
      '#open' => TRUE,
30
    );
31
    foreach ($filters as $key => $filter) {
32
      $form['filters']['status'][$key] = array(
33
        '#title' => $filter['title'],
34
        '#type' => 'select',
35
        '#multiple' => TRUE,
36
        '#size' => 8,
37
        '#options' => $filter['options'],
38
      );
39
      if (!empty($_SESSION['mongodb_watchdog_overview_filter'][$key])) {
40
        $form['filters']['status'][$key]['#default_value'] = $_SESSION['dblog_overview_filter'][$key];
41
      }
42
    }
43
44
    $form['filters']['actions'] = array(
45
      '#type' => 'actions',

modules/mongodb_watchdog/mongodb_watchdog.admin.inc 1 location

@@ 212-223 (lines=12) @@
209
    )),
210
  );
211
212
  foreach ($filters as $key => $filter) {
213
    $form['filters']['status'][$key] = array(
214
      '#title' => check_plain($filter['title']),
215
      '#type' => 'select',
216
      '#multiple' => TRUE,
217
      '#size' => 8,
218
      '#options' => $filter['options'],
219
    );
220
    if (!empty($_SESSION['mongodb_watchdog_overview_filter'][$key])) {
221
      $form['filters']['status'][$key]['#default_value'] = $_SESSION['mongodb_watchdog_overview_filter'][$key];
222
    }
223
  }
224
225
  $form['filters']['buttons']['submit'] = array(
226
    '#type' => 'submit',