class Source
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Source.php \PHPUnit\TextUI\Configuration\Source
- 11.1.x vendor/twig/twig/src/Source.php \Twig\Source
- 11.1.x vendor/squizlabs/php_codesniffer/src/Reports/Source.php \PHP_CodeSniffer\Reports\Source
- 11.1.x vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php \phpDocumentor\Reflection\DocBlock\Tags\Source
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
Hierarchy
- class \SebastianBergmann\CodeCoverage\Report\Xml\Source
Expanded class hierarchy of Source
49 string references to 'Source'
- BaseCommand::getPreferredInstallOptions in vendor/
composer/ composer/ src/ Composer/ Command/ BaseCommand.php - Returns preferSource and preferDist values based on the configuration.
- Checkstyle::generateFileReport in vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Checkstyle.php - Generate a partial report for a single processed file.
- ckeditor5.ckeditor5.yml in core/
modules/ ckeditor5/ ckeditor5.ckeditor5.yml - core/modules/ckeditor5/ckeditor5.ckeditor5.yml
- CliDescriptor::describe in vendor/
symfony/ var-dumper/ Command/ Descriptor/ CliDescriptor.php - Cobertura::process in vendor/
phpunit/ php-code-coverage/ src/ Report/ Cobertura.php
File
-
vendor/
phpunit/ php-code-coverage/ src/ Report/ Xml/ Source.php, line 20
Namespace
SebastianBergmann\CodeCoverage\Report\XmlView source
final class Source {
private readonly DOMElement $context;
public function __construct(DOMElement $context) {
$this->context = $context;
}
public function setSourceCode(string $source) : void {
$context = $this->context;
$tokens = (new Tokenizer())->parse($source);
$srcDom = (new XMLSerializer(new NamespaceUri($context->namespaceURI)))
->toDom($tokens);
$context->parentNode
->replaceChild($context->ownerDocument
->importNode($srcDom->documentElement, true), $context);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Source::$context | private | property | |
Source::setSourceCode | public | function | |
Source::__construct | public | function |