Completed
Push — 8.x-3.x ( 0334d2...6b3e90 )
by Sebastian
04:15
created

Map   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDefinition() 0 7 2
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL\Scalars\TypedData;
4
5
use Drupal\graphql\GraphQL\Type\Scalars\MapType;
6
use Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilderInterface;
7
use Drupal\graphql\Plugin\GraphQL\Scalars\GraphQLString;
8
use Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase;
9
10
/**
11
 * @GraphQLScalar(
12
 *   id = "map",
13
 *   name = "Map",
14
 *   type = "map"
15
 * )
16
 */
17
class Map extends ScalarPluginBase {
0 ignored issues
show
Bug introduced by
There is one abstract method getPluginDefinition in this class; you could implement it, or declare this class as abstract.
Loading history...
18
19
  /**
20
   * {@inheritdoc}
21
   */
22
  public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) {
23
    if (!isset($this->definition)) {
24
      $this->definition = new MapType();
25
    }
26
27
    return $this->definition;
28
  }
29
30
}
31