PHP Class Tester\CodeCoverage\PhpParser

ファイルを表示 Open project: nette/tester Class Usage Examples

Public Methods

Method Description
parse ( $code ) : stdClass

Private Methods

Method Description
fetch ( &$tokens, $take )

Method Details

parse() public method

public parse ( $code ) : stdClass
return stdClass Returned structure is: stdClass { linesOfCode: int, linesOfComments: int, functions: [functionName => $functionInfo], classes: [className => $info], traits: [traitName => $info], interfaces: [interfaceName => $info], } where $functionInfo is: stdClass { start: int, end: int } and $info is: stdClass { start: int, end: int, methods: [methodName => $methodInfo] } where $methodInfo is: stdClass { start: int, end: int, visibility: public|protected|private }