function File::numberOfTestedMethods
Overrides AbstractNode::numberOfTestedMethods
File
-
vendor/
phpunit/ php-code-coverage/ src/ Node/ File.php, line 305
Class
- File
- @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Namespace
SebastianBergmann\CodeCoverage\NodeCode
public function numberOfTestedMethods() : int {
if ($this->numTestedMethods === null) {
$this->numTestedMethods = 0;
foreach ($this->classes as $class) {
foreach ($class['methods'] as $method) {
if ($method['executableLines'] > 0 && $method['coverage'] === 100) {
$this->numTestedMethods++;
}
}
}
foreach ($this->traits as $trait) {
foreach ($trait['methods'] as $method) {
if ($method['executableLines'] > 0 && $method['coverage'] === 100) {
$this->numTestedMethods++;
}
}
}
}
return $this->numTestedMethods;
}