Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
8 / 8 |
| PhpFile | |
100.00% |
1 / 1 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
8 / 8 |
| __construct($path, array $stmts, $newFile = false) | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
| getType() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| getRealPath() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| isModified() | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| modified() | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| <?php | |
| /* | |
| * Mondrian | |
| */ | |
| namespace Trismegiste\Mondrian\Parser; | |
| use PHPParser_NodeAbstract; | |
| /** | |
| * PhpFile is a node in a package repreenting a file | |
| * | |
| */ | |
| class PhpFile extends PHPParser_NodeAbstract | |
| { | |
| protected $absPathName; | |
| public function __construct($path, array $stmts, $newFile = false) | |
| { | |
| $this->absPathName = (string) $path; | |
| parent::__construct($stmts, array('modified' => $newFile)); | |
| } | |
| public function getType() | |
| { | |
| return 'PhpFile'; | |
| } | |
| public function getRealPath() | |
| { | |
| return $this->absPathName; | |
| } | |
| public function isModified() | |
| { | |
| return $this->getAttribute('modified'); | |
| } | |
| public function modified() | |
| { | |
| $this->setAttribute('modified', true); | |
| } | |
| } |