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

Any   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 13
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\AnyType;
6
use Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilderInterface;
7
use Drupal\graphql\Plugin\GraphQL\Scalars\GraphQLString;
8
9
/**
10
 * @GraphQLScalar(
11
 *   id = "any",
12
 *   name = "Any",
13
 *   type = "any"
14
 * )
15
 */
16
class Any extends GraphQLString {
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 AnyType();
24
    }
25
26
    return $this->definition;
27
  }
28
}
29