class UnintentionallyCoveredCodeException
Hierarchy
- class \SebastianBergmann\CodeCoverage\UnintentionallyCoveredCodeException extends \RuntimeException implements \SebastianBergmann\CodeCoverage\Exception
Expanded class hierarchy of UnintentionallyCoveredCodeException
4 files declare their use of UnintentionallyCoveredCodeException
- PhptTestCase.php in vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php - TestCase.php in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php - TestRunner.php in vendor/
phpunit/ phpunit/ src/ Framework/ TestRunner.php - TestSuite.php in vendor/
phpunit/ phpunit/ src/ Framework/ TestSuite.php
File
-
vendor/
phpunit/ php-code-coverage/ src/ Exception/ UnintentionallyCoveredCodeException.php, line 14
Namespace
SebastianBergmann\CodeCoverageView source
final class UnintentionallyCoveredCodeException extends RuntimeException implements Exception {
/**
* @var list<string>
*/
private readonly array $unintentionallyCoveredUnits;
/**
* @param list<string> $unintentionallyCoveredUnits
*/
public function __construct(array $unintentionallyCoveredUnits) {
$this->unintentionallyCoveredUnits = $unintentionallyCoveredUnits;
parent::__construct($this->toString());
}
/**
* @return list<string>
*/
public function getUnintentionallyCoveredUnits() : array {
return $this->unintentionallyCoveredUnits;
}
private function toString() : string {
$message = '';
foreach ($this->unintentionallyCoveredUnits as $unit) {
$message .= '- ' . $unit . "\n";
}
return $message;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UnintentionallyCoveredCodeException::$unintentionallyCoveredUnits | private | property | |
UnintentionallyCoveredCodeException::getUnintentionallyCoveredUnits | public | function | |
UnintentionallyCoveredCodeException::toString | private | function | |
UnintentionallyCoveredCodeException::__construct | public | function |