Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function execute(InputInterface $input, OutputInterface $output) |
||
32 | { |
||
33 | $warehouse = Warehouse::createFromJson(getcwd() . "/resources/biggerWarehouse.json"); |
||
34 | |||
35 | /** @var Place $nodeStart */ |
||
36 | $nodeStart = $warehouse->getPlacesCollector()->getPlaces()[5]; |
||
37 | /** @var Place $nodeEnd */ |
||
38 | $nodeEnd = $warehouse->getPlacesCollector()->getPlaces()[30]; |
||
39 | |||
40 | $warehouse->getPath($nodeStart, $nodeEnd); |
||
41 | |||
42 | $calculatedMatrix = $warehouse->getParser()->getCalculatedMatrix(); |
||
|
|||
43 | |||
44 | $table = new Table($output); |
||
45 | $table->setRows($calculatedMatrix); |
||
46 | $table->render(); |
||
47 | |||
48 | $output->writeln("Start: " . $nodeStart->getName()); |
||
49 | $output->writeln("End: " . $nodeEnd->getName()); |
||
50 | $output->writeln("Total path: " . $nodeEnd->getCurrentWeight()); |
||
51 | } |
||
53 |