Code Duplication    Length = 11-11 lines in 3 locations

modules/mongodb_watchdog/src/Controller/DetailController.php 1 location

@@ 66-76 (lines=11) @@
63
   * @return array
64
   *   A render array.
65
   */
66
  public function build(Request $request, EventTemplate $eventTemplate): array {
67
    $top = $this->getTop($eventTemplate);
68
69
    $rows = $this->getRowData($request, $eventTemplate);
70
    $main = empty($rows)
71
      ? $this->buildEmpty($this->t('No occurrence of this event found in logger.'))
72
      : $this->buildMainTable($rows, $eventTemplate);
73
74
    $ret = $this->buildDefaults($main, $top);
75
    return $ret;
76
  }
77
78
  /**
79
   * Build the main table.

modules/mongodb_watchdog/src/Controller/OverviewController.php 1 location

@@ 130-140 (lines=11) @@
127
   *
128
   * @throws \ReflectionException
129
   */
130
  public function build(Request $request): array {
131
    $top = $this->getTop();
132
133
    $rows = $this->getRowData($request);
134
    $main = empty($rows)
135
      ? $this->buildEmpty($this->t('No event found in logger.'))
136
      : $this->buildMainTable($rows);
137
138
    $ret = $this->buildDefaults($main, $top);
139
    return $ret;
140
  }
141
142
  /**
143
   * Build the main table.

modules/mongodb_watchdog/src/Controller/TopController.php 1 location

@@ 75-85 (lines=11) @@
72
   * @return array
73
   *   A render array.
74
   */
75
  public function build(Request $request, string $type): array {
76
    $top = $this->getTop();
77
78
    $rows = $this->getRowData($request, $type);
79
    $main = empty($rows)
80
      ? $this->buildEmpty($this->t('No "%type" message found', ['%type' => $type]))
81
      : $this->buildMainTable($rows);
82
83
    $ret = $this->buildDefaults($main, $top);
84
    return $ret;
85
  }
86
87
  /**
88
   * Build the main table.