GraphQLFragmentNode   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace Drupal\graphql_twig;
4
5
/**
6
 * A Twig node for collecting GraphQL query fragments in twig templates.
7
 */
8
class GraphQLFragmentNode extends \Twig_Node {
9
10
  /**
11
   * The fragment string.
12
   *
13
   * @var string
14
   */
15
  public $fragment = "";
16
17
  /**
18
   * GraphQLFragmentNode constructor.
19
   *
20
   * @param string $fragment
21
   *   The query fragment.
22
   *
23
   * @throws \GraphQL\Error\SyntaxError
24
   *   Thrown if the GraphQL query is not valid.
25
   */
26
  public function __construct($fragment) {
27
    $this->fragment = $fragment;
28
    parent::__construct();
29
  }
30
31
}
32