Implementation::isSame()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace PHPSemVerChecker\Comparator;
4
5
use PhpParser\NodeDumper;
6
7
class Implementation
8
{
9
	/**
10
	 * @param array $statementsA
11
	 * @param array $statementsB
12
	 * @return bool
13
	 */
14 79
	public static function isSame(array $statementsA, array $statementsB)
15
	{
16
		// Naive way to check if two implementation are the same
17 79
		$nodeDumper = new NodeDumper();
18
19 79
		$dumpA = $nodeDumper->dump($statementsA);
20 79
		$dumpB = $nodeDumper->dump($statementsB);
21
22 79
		return $dumpA === $dumpB;
23
	}
24
}
25