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

NodeComparator::compare()   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 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
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