Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
7 / 7 |
Builder | |
100.00% |
1 / 1 |
|
100.00% |
4 / 4 |
4 | |
100.00% |
7 / 7 |
buildLexer() | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
buildFileLevel() | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
buildPackageLevel() | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
getParsed(\Iterator $iter) | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
/* | |
* Mondrian | |
*/ | |
namespace Trismegiste\Mondrian\Builder\Statement; | |
use Trismegiste\Mondrian\Parser\PackageParser; | |
/** | |
* Statement is a builder of statement of set of php files | |
*/ | |
class Builder implements BuilderInterface | |
{ | |
protected $lexer; | |
protected $fileParser; | |
protected $packageParser; | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildLexer() | |
{ | |
$this->lexer = new \PHPParser_Lexer(); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildFileLevel() | |
{ | |
$this->fileParser = new \PHPParser_Parser($this->lexer); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildPackageLevel() | |
{ | |
$this->packageParser = new PackageParser($this->fileParser); | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getParsed(\Iterator $iter) | |
{ | |
return $this->packageParser->parse($iter); | |
} | |
} |