Skip to content

Commit

Permalink
Update clue/graph to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed May 31, 2015
1 parent f8199a0 commit 0598117
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"nette/reflection": "~2.2",
"nette/utils": "~2.2",
"facebook/webdriver": "~0.6.0",
"clue/graph": "~0.7.1",
"clue/graph": "~0.9.0",
"graphp/algorithms": "^0.8.1",
"florianwolters/component-util-singleton": "0.3.2",
"caseyamcl/configula": "~2.3",
"doctrine/inflector": "~1.0"
Expand Down
4 changes: 3 additions & 1 deletion src-tests/Process/Fixtures/MockOrderStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace Lmc\Steward\Process\Fixtures;

use Fhaculty\Graph\Algorithm\Tree\OutTree;
use Fhaculty\Graph\Vertex;
use Graphp\Algorithms\Tree\OutTree;
use Lmc\Steward\Process\OptimizeOrderInterface;

class MockOrderStrategy implements OptimizeOrderInterface
Expand All @@ -19,6 +20,7 @@ public function optimize(OutTree $tree)

$i = 0;
$output = [];
/** @var Vertex $vertex */
foreach ($vertices as $vertex) {
$output[$vertex->getId()] = $i++;
}
Expand Down
2 changes: 1 addition & 1 deletion src-tests/Process/MaxTotalDelayStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Lmc\Steward\Process;

use Fhaculty\Graph\Algorithm\Tree\OutTree;
use Graphp\Algorithms\Tree\OutTree;
use Fhaculty\Graph\Graph;

class MaxTotalDelayStrategyTest extends \PHPUnit_Framework_TestCase
Expand Down
3 changes: 2 additions & 1 deletion src-tests/Process/ProcessSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Lmc\Steward\Process;

use Graphp\Algorithms\Tree\OutTree;
use Lmc\Steward\Process\Fixtures\MockOrderStrategy;
use Lmc\Steward\Publisher\XmlPublisher;
use Symfony\Component\Console\Output\BufferedOutput;
Expand Down Expand Up @@ -294,7 +295,7 @@ public function testShouldBuildGraphTreeFromProcessDependencies()


$tree = $this->set->buildTree();
$this->assertInstanceOf('Fhaculty\Graph\Algorithm\Tree\OutTree', $tree);
$this->assertInstanceOf(OutTree::class, $tree);

$this->assertEquals(2, $tree->getHeight()); // 2, because single vertex graph has height 0
$root = $tree->getVertexRoot();
Expand Down
6 changes: 4 additions & 2 deletions src/Process/MaxTotalDelayStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

namespace Lmc\Steward\Process;

use Fhaculty\Graph\Algorithm\ShortestPath\Dijkstra;
use Fhaculty\Graph\Algorithm\Tree\OutTree;
use Graphp\Algorithms\ShortestPath\Dijkstra;
use Graphp\Algorithms\Tree\OutTree;
use Fhaculty\Graph\Vertex;

class MaxTotalDelayStrategy implements OptimizeOrderInterface
{
Expand All @@ -24,6 +25,7 @@ public function optimize(OutTree $tree)

// for each vertex (process) get maximum total weight of its subtree (longest distance)
$subTreeMaxDistances = [];
/** @var Vertex $childVertex */
foreach ($children as $childVertex) {
$alg = new Dijkstra($childVertex);
// get map with distances to all linked reachable vertexes
Expand Down
2 changes: 1 addition & 1 deletion src/Process/OptimizeOrderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Lmc\Steward\Process;

use Fhaculty\Graph\Algorithm\Tree\OutTree;
use Graphp\Algorithms\Tree\OutTree;

/**
* Interface for optimizers of tests order.
Expand Down
2 changes: 1 addition & 1 deletion src/Process/ProcessSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Lmc\Steward\Process;

use Fhaculty\Graph\Algorithm\Tree\OutTree;
use Graphp\Algorithms\Tree\OutTree;
use Fhaculty\Graph\Graph;
use Lmc\Steward\Publisher\AbstractPublisher;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down

0 comments on commit 0598117

Please sign in to comment.