GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — 8.x-4.x ( dd2d8a...0598fb )
by Brant
05:05
created

_df_tools_landing_page_init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * @file
5
 * Contains df_tools_landing_page.module.
6
 */
7
8
use Drupal\Core\Form\FormStateInterface;
9
10
/**
11
 * Implements hook_form_FORM_ID_alter().
12
 *
13
 * @param $form
14
 * @param \Drupal\Core\Form\FormStateInterface $form_state
15
 */
16
function df_tools_landing_page_form_node_landing_page_form_alter(array &$form, FormStateInterface $form_state) {
0 ignored issues
show
Unused Code introduced by
The parameter $form_state 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

16
function df_tools_landing_page_form_node_landing_page_form_alter(array &$form, /** @scrutinizer ignore-unused */ FormStateInterface $form_state) {

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...
17
  if (\Drupal::routeMatch()->getRouteName() == 'node.add') {
18
    foreach (array_keys($form['actions']) as $action) {
19
      if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') {
20
        $form['actions'][$action]['#submit'][] = '_df_tools_landing_page_init';
21
      }
22
    }
23
  }
24
}
25
26
/**
27
 * @param array $form
28
 * @param \Drupal\Core\Form\FormStateInterface $form_state
29
 */
30
function _df_tools_landing_page_init(array &$form, FormStateInterface $form_state) {
0 ignored issues
show
Unused Code introduced by
The parameter $form 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

30
function _df_tools_landing_page_init(/** @scrutinizer ignore-unused */ array &$form, FormStateInterface $form_state) {

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...
31
  $routeParams = $form_state->getRedirect()->getRouteParameters();
32
  $form_state->setRedirect('layout_builder.overrides.node.view', $routeParams);
33
}
34