public function __construct($dir, GraphViz $graphviz = null)
{
if ($graphviz === null) {
$graphviz = new GraphViz();
$graphviz->setFormat('svg');
}
$analyzer = new \JMS\Composer\DependencyAnalyzer();
$this->dependencyGraph = $analyzer->analyze($dir);
$this->graphviz = $graphviz;
}