Passed
Pull Request — master (#308)
by Christoffer
02:47
created

NodeComparator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A compare() 0 3 1
1
<?php
2
3
namespace Digia\GraphQL\Util;
4
5
use Digia\GraphQL\Language\Node\NodeInterface;
6
7
class NodeComparator
8
{
9
    /**
10
     * @param NodeInterface $node
11
     * @param NodeInterface $other
12
     * @return bool
13
     */
14
    public static function compare(NodeInterface $node, NodeInterface $other): bool
15
    {
16
        return $node->toJSON() === $other->toJSON();
17
    }
18
}
19