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-404 ( bbf086...a89268 )
by
unknown
05:03
created

ScenariosUIBlock::build()   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 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Drupal\dfs_default\Plugin\Block;
4
5
use Drupal\Core\Block\BlockBase;
6
use Drupal\Core\Access\AccessResult;
7
8
/**
9
 * Provides a 'ScenariosUIBlock' block.
10
 *
11
 * @Block(
12
 *  id = "scenarios_uiblock",
13
 *  admin_label = @Translation("Scenarios UI Block"),
14
 *  category = @Translation("Scenarios")
15
 * )
16
 */
17
class ScenariosUIBlock extends BlockBase {
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function blockAccess($account) {
23
    if ($account->hasPermission('administer scenarios')) {
24
      return AccessResult::allowed();
25
    }
26
    return AccessResult::forbidden();
27
  }
28
29
  /**
30
   * {@inheritdoc}
31
   */
32
  public function build() {
33
    $form = \Drupal::formBuilder()->getForm('Drupal\scenarios_ui\Form\ScenariosUIForm');
34
    return $form;
35
  }
36
37
}
38