Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Source.php

function Source::setSourceCode

File

vendor/phpunit/php-code-coverage/src/Report/Xml/Source.php, line 29

Class

Source
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

Namespace

SebastianBergmann\CodeCoverage\Report\Xml

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal