Completed
Pull Request — 8.x-3.x (#503)
by Sebastian
02:58 queued 50s
created

GraphQLUpload::getDefinition()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL\Scalars;
4
5
use Drupal\graphql\GraphQL\Type\UploadType;
6
use Drupal\graphql\Plugin\GraphQL\PluggableSchemaBuilderInterface;
7
8
/**
9
 * @GraphQLScalar(
10
 *   id = "upload",
11
 *   name = "Upload"
12
 * )
13
 */
14
class GraphQLUpload 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...
15
16
  /**
17
   * {@inheritdoc}
18
   */
19
  public function getDefinition(PluggableSchemaBuilderInterface $schemaBuilder) {
20
    if (!isset($this->definition)) {
21
      $this->definition = new UploadType();
22
    }
23
24
    return $this->definition;
25
  }
26
}
27