Analyzer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A analyze() 0 18 2
1
<?php
2
3
namespace PHPSemVerChecker\Analyzer;
4
5
use PHPSemVerChecker\Registry\Registry;
6
use PHPSemVerChecker\Report\Report;
7
8
class Analyzer
9
{
10
	/**
11
	 * Compare with a destination registry (what the new source code is like).
12
	 *
13
	 * @param \PHPSemVerChecker\Registry\Registry $registryBefore
14
	 * @param \PHPSemVerChecker\Registry\Registry $registryAfter
15
	 * @return \PHPSemVerChecker\Report\Report
16
	 */
17 1
	public function analyze(Registry $registryBefore, Registry $registryAfter)
18
	{
19 1
		$finalReport = new Report();
20
21
		$analyzers = [
22 1
			new FunctionAnalyzer(),
23 1
			new ClassAnalyzer(),
24 1
			new InterfaceAnalyzer(),
25 1
			new TraitAnalyzer(),
26
		];
27
28 1
		foreach ($analyzers as $analyzer) {
29 1
			$report = $analyzer->analyze($registryBefore, $registryAfter);
30 1
			$finalReport->merge($report);
31
		}
32
33 1
		return $finalReport;
34
	}
35
}
36