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

AbstractQueryVisitor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
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\Field\AbstractField;
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
  abstract public function visit(AbstractField $field);
23
}