Completed
Pull Request — 8.x-2.x (#24)
by Frédéric G.
03:14
created

ControllerBase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
namespace Drupal\mongodb_watchdog\Controller;
4
5
use Drupal\Core\Config\ImmutableConfig;
6
use Drupal\Core\Controller\ControllerBase as CoreControllerBase;
7
8
abstract class ControllerBase extends CoreControllerBase {
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
9
10
  /**
11
   * The items_per_page configuration value.
12
   *
13
   * @var int
14
   */
15
  protected $itemsPerPage;
16
17
  /**
18
   * ControllerBase constructor.
19
   *
20
   * @param \Drupal\Core\Config\ImmutableConfig $config
21
   *   The module configuration.
22
   */
23
  public function __construct(ImmutableConfig $config) {
24
    $this->itemsPerPage = $config->get('items_per_page');
25
  }
26
}
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...
27