Completed
Push — master ( 0f7b0a...750008 )
by Christoffer
02:09
created

AbstractRule   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A leaveNode() 0 3 1
A enterNode() 0 3 1
1
<?php
2
3
namespace Digia\GraphQL\Validation\Rule;
4
5
use Digia\GraphQL\Language\AST\Node\NodeInterface;
6
use Digia\GraphQL\Language\AST\Visitor\VisitorInterface;
7
use Digia\GraphQL\Validation\ValidationContextAwareTrait;
8
9
abstract class AbstractRule implements RuleInterface, VisitorInterface
10
{
11
    use ValidationContextAwareTrait;
12
13
    /**
14
     * @inheritdoc
15
     */
16
    public function enterNode(NodeInterface $node): ?NodeInterface
17
    {
18
        return $node;
19
    }
20
21
    /**
22
     * @inheritdoc
23
     */
24
    public function leaveNode(NodeInterface $node): ?NodeInterface
25
    {
26
        return $node;
27
    }
28
}
29