Implementation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isSame() 0 10 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