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

AbstractRule::enterNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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