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

EventTemplateStorage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A __call() 0 4 1
1
<?php
2
3
namespace Drupal\mongodb_watchdog\Model;
4
5
use Doctrine\Common\Util\Debug;
6
use Drupal\Core\Cache\CacheBackendInterface;
7
use Drupal\Core\Entity\ContentEntityTypeInterface;
8
use Drupal\Core\Entity\EntityManagerInterface;
9
use Drupal\mongodb_storage\Model\ContentEntityStorageBase;
10
11
class EventTemplateStorage extends ContentEntityStorageBase {
12
  public function __construct(ContentEntityTypeInterface $entityType,
13
    EntityManagerInterface $entityManager,
14
    CacheBackendInterface $cacheBackend) {
15
    $databaseFactory = \Drupal::service('mongodb.database_factory');
16
    parent::__construct($entityType, $entityManager, $cacheBackend, $databaseFactory);
17
  }
18
19
  public function __call($name, array $args) {
20
    Debug::dump($name, $args);
21
    return call_user_func_array(parent::$name, $args);
22
  }
23
}
24