Completed
Push — 15-request_grouping ( b34bbe...76e174 )
by Frédéric G.
02:44
created

RequestController::track()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
<?php
2
3
namespace Drupal\mongodb_watchdog\Controller;
4
5
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
6
use Symfony\Component\DependencyInjection\ContainerInterface;
7
8
/**
9
 * Implements the controller for the request events page.
10
 */
11
class RequestController implements ContainerInjectionInterface {
12
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public static function create(ContainerInterface $container) {
17
    return new static();
18
  }
19
20
  /**
21
   * Controller.
22
   *
23
   * @param string $unique_id
24
   *   The unique request id from mod_unique_id.
25
   *
26
   * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
27
   *   A render array.
28
   */
29
  public function track($unique_id) {
30
    return [
31
      '#markup' => $unique_id,
32
    ];
33
  }
34
35
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
36