StaticExample   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
c 0
b 0
f 0
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A printSolution() 0 10 1
1
<?php
2
3
namespace JMGQ\AStar\Example\Terrain;
4
5
use JMGQ\AStar\AStar;
6
7
class StaticExample
8
{
9 5
    public static function printSolution(TerrainCost $terrainCost, Position $start, Position $goal): void
10
    {
11 5
        $domainLogic = new DomainLogic($terrainCost);
12 5
        $aStar = new AStar($domainLogic);
13
14 5
        $solution = $aStar->run($start, $goal);
15
16 5
        $printer = new SequencePrinter($terrainCost, $solution);
17
18 5
        $printer->printSequence();
19 5
    }
20
}
21