for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* PHP version 7.1
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace PhUml\Generators;
use PhUml\Parser\CodeFinder;
* It generates a file with a digraph in DOT format that can be used to create a class diagram
* You might want to create a different output using either `neato` or `dot`.
* The file this command creates can be used as an intermediate step.
* For instance:
* `neato -Tpdf output.gv > output.pdf`
* Where `output.gv` is the file generated by this action
class DotFileGenerator extends DigraphGenerator
{
* The process to generate a class diagram is as follows
* 1. The parser produces a collection of classes and interfaces
* 2. The `graphviz` processor takes this collection and creates a digraph using the DOT language
* 4. The DOT file is saved to the given path
* @throws \LogicException If the command is missing
public function generate(CodeFinder $finder, string $dotFilePath): void
$this->display()->start();
$digraph = $this->generateDigraph($this->parseCode($finder));
$this->save($this->digraphProcessor, $digraph, $dotFilePath);
}