Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
5 / 5 |
| AbstractCentrality | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
5 / 5 |
| getAlgorithm() | |
100.00% |
1 / 1 |
1 | ||||||
| getSubname() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| getFullDesc() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| processGraph(Graph $graph, OutputInterface $output) | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
| createCentrality(Graph $g) | |
100.00% |
1 / 1 |
1 | ||||||
| <?php | |
| /* | |
| * Mondrian | |
| */ | |
| namespace Trismegiste\Mondrian\Command; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| use Trismegiste\Mondrian\Graph\Graph; | |
| /** | |
| * AbstractCentrality transforms a bunch of php files into a digraph | |
| * and exports it into a report file with centrality informations | |
| * | |
| */ | |
| abstract class AbstractCentrality extends AbstractParse | |
| { | |
| abstract protected function getAlgorithm(); | |
| protected function getSubname() | |
| { | |
| return $this->getAlgorithm(); | |
| } | |
| protected function getFullDesc() | |
| { | |
| return parent::getFullDesc() . ' with centrality informations'; | |
| } | |
| protected function processGraph(Graph $graph, OutputInterface $output) | |
| { | |
| $algo = $this->createCentrality($graph); | |
| $algo->decorate(); | |
| return $graph; | |
| } | |
| /** | |
| * @return Centrality | |
| */ | |
| abstract protected function createCentrality(Graph $g); | |
| } |