Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  remove duplicated code
  fix undefined variable when rethrowing
  remove dependencies from the object graph
  • Loading branch information
Baptouuuu committed Feb 21, 2019
2 parents 61bf25c + 68dffa7 commit 439ae68
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 1,678 deletions.
16 changes: 12 additions & 4 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
Graph,
Visualize,
LocationRewriter,
Visitor\FlagDependencies,
Visitor\RemoveDependenciesSubGraph,
};
use Innmind\Url\{
UrlInterface,
Expand All @@ -26,9 +28,9 @@
protected function main(Environment $env, OperatingSystem $os): void
{
$package = bootstrap(
$os->remote()->http(),
new UrlResolver,
$os->filesystem()->mount(
$http = $os->remote()->http(),
$resolver = new UrlResolver,
$filesystem = $os->filesystem()->mount(
$os->status()->tmp()
)
);
Expand All @@ -49,6 +51,12 @@ public function __invoke(UrlInterface $location): UrlInterface
));
}
});
$flag = new FlagDependencies($http, $resolver, $filesystem);
$remove = new RemoveDependenciesSubGraph;

$node = $graph($package);
$flag($node);
$remove($node);

$os
->control()
Expand All @@ -58,7 +66,7 @@ public function __invoke(UrlInterface $location): UrlInterface
->withShortOption('Tsvg')
->withShortOption('o', 'graph.svg')
->withInput(
$visualize($graph($package))
$visualize($node)
)
)
->wait();
Expand Down

0 comments on commit 439ae68

Please sign in to comment.