Passed
Pull Request — 8.x-2.x (#26)
by Frédéric G.
02:49
created

EventTemplateViewsData   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getViewsData() 0 11 1
1
<?php
2
3
namespace Drupal\mongodb_watchdog\Entity;
4
5
use Drupal\views\EntityViewsData;
6
use Drupal\views\EntityViewsDataInterface;
7
8
/**
9
 * Provides Views data for Event template entities.
10
 */
11
class EventTemplateViewsData extends EntityViewsData implements EntityViewsDataInterface {
12
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public function getViewsData() {
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
17
    $data = parent::getViewsData();
18
19
    $data['mongodb_watchdog_event_template']['table']['base'] = array(
20
      'field' => 'id',
21
      'title' => $this->t('Event template'),
22
      'help' => $this->t('The Event template ID.'),
23
    );
24
25
    return $data;
26
  }
27
28
}
29