Completed
Push — 8.x-3.x ( 629366...4b6eac )
by Sebastian
02:06
created

GraphQLDateTimeTz   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A buildConfig() 0 3 1
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL\Scalars;
4
5
use Drupal\graphql\Plugin\GraphQL\SchemaBuilderInterface;
6
use Drupal\graphql\Plugin\GraphQL\Traits\CacheablePluginTrait;
7
use Drupal\graphql\Plugin\GraphQL\Traits\PluginTrait;
8
use Drupal\graphql\Plugin\GraphQL\TypeSystemPluginInterface;
9
use Youshido\GraphQL\Type\Scalar\DateTimeTzType;
10
11
/**
12
 * Scalar string type.
13
 *
14
 * @GraphQLScalar(
15
 *   id = "date_time_tz",
16
 *   name = "DateTimeTz"
17
 * )
18
 */
19
class GraphQLDateTimeTz extends DateTimeTzType implements TypeSystemPluginInterface {
20
  use PluginTrait;
21
  use CacheablePluginTrait;
22
23
  /**
24
   * {@inheritdoc}
25
   */
26
  public function __construct(array $configuration, $pluginId, $pluginDefinition) {
27
    $this->constructPlugin($configuration, $pluginId, $pluginDefinition);
28
  }
29
30
  /**
31
   * {@inheritdoc}
32
   */
33
  public function buildConfig(SchemaBuilderInterface $schemaManager) {
34
    // Nothing to do here.
35
  }
36
}
37