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

DeprecatablePluginTrait::buildDeprecationReason()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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