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.
Completed
Push — 8.x-2.x ( 7cb997...1125d6 )
by Devin
03:14
created

DFBehatInitCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A execute() 0 15 2
1
<?php
2
3
namespace Drupal\df\Command;
4
5
use Drupal\lightning\Command\BehatInitCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * A command to generate Behat configuration for an installed Drupal site.
11
 */
12
class DFBehatInitCommand extends BehatInitCommand {
13
14
  /**
15
   * BehatInitCommand constructor.
16
   *
17
   * @param \Drupal\Core\File\FileSystemInterface $file_system
18
   *   The file system service.
19
   * @param string $app_root
20
   *   The Drupal application root.
21
   */
22
  public function __construct($file_system, $app_root) {
23
    parent::__construct($file_system, $app_root);
24
  }
25
26
  /**
27
   * {@inheritdoc}
28
   */
29
  protected function execute(InputInterface $input, OutputInterface $output) {
30
    parent::execute($input, $output);
31
32
    $config = $this->readConfig();
33
34
    // Use the Drupal Extension, if available.
35
    if (class_exists('\Drupal\DrupalExtension\ServiceContainer\DrupalExtension')) {
36
      // Use DF-specific message selectors.
37
      $config['default']['extensions']['Drupal\DrupalExtension']['selectors']['message_selector'] = '.zurb-foundation-callout';
38
      $config['default']['extensions']['Drupal\DrupalExtension']['selectors']['error_message_selector'] = '.zurb-foundation-callout.alert';
39
      $config['default']['extensions']['Drupal\DrupalExtension']['selectors']['success_message_selector'] = '.zurb-foundation-callout.success';
40
    }
41
42
    $this->writeConfig($config, $input->getOption('merge'));
43
  }
44
45
}
46