DescribablePluginTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildDescription() 0 6 2
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL\Traits;
4
5
trait DescribablePluginTrait {
6
7
  /**
8
   * @param $definition
9
   *
10
   * @return null|string
11
   */
12
  protected function buildDescription($definition) {
13
    if (!empty($definition['description'])) {
14
      return (string) $definition['description'];
15
    }
16
17
    return NULL;
18
  }
19
20
}
21