protected function PHP_CodeCoverage_Report_Node_File::processClasses in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php \PHP_CodeCoverage_Report_Node_File::processClasses()
Parameters
PHP_Token_Stream $tokens:
1 call to PHP_CodeCoverage_Report_Node_File::processClasses()
- PHP_CodeCoverage_Report_Node_File::calculateStatistics in vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ Node/ File.php - Calculates coverage statistics for the file.
File
- vendor/
phpunit/ php-code-coverage/ src/ CodeCoverage/ Report/ Node/ File.php, line 536
Class
- PHP_CodeCoverage_Report_Node_File
- Represents a file in the code coverage information tree.
Code
protected function processClasses(PHP_Token_Stream $tokens) {
$classes = $tokens
->getClasses();
unset($tokens);
$link = $this
->getId() . '.html#';
foreach ($classes as $className => $class) {
$this->classes[$className] = array(
'className' => $className,
'methods' => array(),
'startLine' => $class['startLine'],
'executableLines' => 0,
'executedLines' => 0,
'ccn' => 0,
'coverage' => 0,
'crap' => 0,
'package' => $class['package'],
'link' => $link . $class['startLine'],
);
$this->startLines[$class['startLine']] =& $this->classes[$className];
$this->endLines[$class['endLine']] =& $this->classes[$className];
foreach ($class['methods'] as $methodName => $method) {
$this->classes[$className]['methods'][$methodName] = array(
'methodName' => $methodName,
'signature' => $method['signature'],
'startLine' => $method['startLine'],
'endLine' => $method['endLine'],
'executableLines' => 0,
'executedLines' => 0,
'ccn' => $method['ccn'],
'coverage' => 0,
'crap' => 0,
'link' => $link . $method['startLine'],
);
$this->startLines[$method['startLine']] =& $this->classes[$className]['methods'][$methodName];
$this->endLines[$method['endLine']] =& $this->classes[$className]['methods'][$methodName];
}
}
}