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 ( 1e8d8b...4d41fe )
by Kevin
05:14
created

one_preprocess_page()   B

Complexity

Conditions 7
Paths 32

Size

Total Lines 37
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 7
eloc 19
c 1
b 0
f 0
nc 32
nop 1
dl 0
loc 37
rs 8.8333
1
<?php
2
/**
3
 * @file
4
 * Theme and preprocess functions for page.
5
 */
6
7
function one_preprocess_page(&$variables) {
8
  // Add the class container if layout builder is not used.
9
  if (!\Drupal::routeMatch()->getParameter('node') &&
10
    !\Drupal::routeMatch()->getRouteObject()->hasOption('_layout_builder')) {
11
      $variables['container_class'] = 'container';
12
  }
13
14
  // Set container for Meta Header
15
  if (theme_get_setting('meta_header_full_width')) {
16
    $variables['meta_header_width'] = 'container-fluid';
17
  }
18
  else {
19
    $variables['meta_header_width'] = 'container';
20
  }
21
22
  // Set container for Navbar
23
  if (theme_get_setting('navbar_full_width')) {
24
    $variables['navbar_width'] = 'container-fluid';
25
  }
26
  else {
27
    $variables['navbar_width'] = 'container';
28
  }
29
30
  // Set container for Header
31
  if (theme_get_setting('header_full_width')) {
32
    $variables['header_width'] = 'container-fluid';
33
  }
34
  else {
35
    $variables['header_width'] = 'container';
36
  }
37
38
  // Set container for Footer
39
  if (theme_get_setting('footer_full_width')) {
40
    $variables['footer_width'] = 'container-fluid';
41
  }
42
  else {
43
    $variables['footer_width'] = 'container';
44
  }
45
}
46