Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
6 / 6 |
Director | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
6 / 6 |
__construct(BuilderInterface $struct) | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
parse(\Iterator $iter) | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
<?php | |
/* | |
* Mondrian | |
*/ | |
namespace Trismegiste\Mondrian\Builder\Statement; | |
/** | |
* Director is a director for parsing a set of failes | |
*/ | |
class Director | |
{ | |
private $builder; | |
public function __construct(BuilderInterface $struct) | |
{ | |
$this->builder = $struct; | |
} | |
/** | |
* Parses a list of php files | |
* | |
* @param \Iterator $iter an iterator of SplFileInfo | |
* @return array an array of PHPParser_Node | |
*/ | |
public function parse(\Iterator $iter) | |
{ | |
$this->builder->buildLexer(); | |
$this->builder->buildFileLevel(); | |
$this->builder->buildPackageLevel(); | |
return $this->builder->getParsed($iter); | |
} | |
} |