Completed
Pull Request — 8.x-3.x (#490)
by Sebastian
02:46
created

Undefined   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\UndefinedType;
6
use Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilderInterface;
7
use Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase;
8
9
/**
10
 * @GraphQLScalar(
11
 *   id = "undefined",
12
 *   name = "Undefined",
13
 *   type = "undefined"
14
 * )
15
 */
16
class Undefined 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...
17
18
  /**
19
   * {@inheritdoc}
20
   */
21
  public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) {
22
    if (!isset($this->definition)) {
23
      $this->definition = new UndefinedType();
24
    }
25
26
    return $this->definition;
27
  }
28
29
}
30