Completed
Pull Request — 8.x-3.x (#442)
by Sebastian
02:26
created

TypeSystemPluginReferenceTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPlugin() 0 3 1
1
<?php
2
3
namespace Drupal\graphql\Plugin\GraphQL;
4
5
trait TypeSystemPluginReferenceTrait {
6
7
  /**
8
   * {@inheritdoc}
9
   */
10
  public function getPlugin() {
11
    return $this->plugin;
0 ignored issues
show
Bug introduced by
The property plugin does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
12
  }
13
14
}