Completed
Pull Request — master (#15)
by
unknown
03:53
created

AbstractQueryVisitor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 23
rs 10
ccs 3
cts 5
cp 0.6

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getMemo() 0 3 1
visit() 0 1 ?
1
<?php
2
3
namespace Youshido\GraphQL\Execution\Visitor;
4
5
6
use Youshido\GraphQL\Config\Field\FieldConfig;
7
8
abstract class AbstractQueryVisitor {
9
10
  protected $initialValue = 0;
11
12
  protected $memo;
13
14 1
  public function __construct() {
15 1
    $this->memo = $this->initialValue;
16 1
  }
17
18
  public function getMemo() {
19
    return $this->memo;
20
  }
21
22
  /**
23
   * @param array       $args
24
   * @param FieldConfig $fieldConfig
25
   * @param int         $childScore
26
   *
27
   * @return mixed
28
   */
29
  abstract public function visit(array $args, FieldConfig $fieldConfig, $childScore = 0);
30
}