entityreference_rendered_widget_help()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 7
nc 2
nop 2
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @file
5
 * Contains entityreference_rendered_widget.module.
6
 */
7
8
use Drupal\Core\Routing\RouteMatchInterface;
0 ignored issues
show
Bug introduced by
The type Drupal\Core\Routing\RouteMatchInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
/**
11
 * Implements hook_help().
12
 */
13
function entityreference_rendered_widget_help($route_name, RouteMatchInterface $route_match) {
0 ignored issues
show
Unused Code introduced by
The parameter $route_match is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

13
function entityreference_rendered_widget_help($route_name, /** @scrutinizer ignore-unused */ RouteMatchInterface $route_match) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
14
  switch ($route_name) {
15
    case 'help.page.entityreference_rendered_widget':
16
      $output = '';
17
      $output .= '<h3>' . t('About') . '</h3>';
0 ignored issues
show
Bug introduced by
The function t was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
      $output .= '<h3>' . /** @scrutinizer ignore-call */ t('About') . '</h3>';
Loading history...
18
      $output .= '<p>' . t('Implements widget for Rendered Display in Entity Reference') . '</p>';
19
      return $output;
20
21
    default:
22
  }
23
}
24