Completed
Pull Request — 8.x-3.x (#525)
by Philipp
08:20
created

DeprecatablePluginTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

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