upgrade to laravel 8.x
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
* This file is part of phpunit/php-code-coverage.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -9,17 +9,22 @@
|
||||
*/
|
||||
namespace SebastianBergmann\CodeCoverage\Report\Xml;
|
||||
|
||||
use SebastianBergmann\CodeCoverage\RuntimeException;
|
||||
use DOMElement;
|
||||
use SebastianBergmann\CodeCoverage\ReportAlreadyFinalizedException;
|
||||
use XMLWriter;
|
||||
|
||||
/**
|
||||
* @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
|
||||
*/
|
||||
final class Coverage
|
||||
{
|
||||
/**
|
||||
* @var \XMLWriter
|
||||
* @var XMLWriter
|
||||
*/
|
||||
private $writer;
|
||||
|
||||
/**
|
||||
* @var \DOMElement
|
||||
* @var DOMElement
|
||||
*/
|
||||
private $contextNode;
|
||||
|
||||
@@ -28,23 +33,23 @@ final class Coverage
|
||||
*/
|
||||
private $finalized = false;
|
||||
|
||||
public function __construct(\DOMElement $context, string $line)
|
||||
public function __construct(DOMElement $context, string $line)
|
||||
{
|
||||
$this->contextNode = $context;
|
||||
|
||||
$this->writer = new \XMLWriter();
|
||||
$this->writer = new XMLWriter();
|
||||
$this->writer->openMemory();
|
||||
$this->writer->startElementNS(null, $context->nodeName, 'https://schema.phpunit.de/coverage/1.0');
|
||||
$this->writer->writeAttribute('nr', $line);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeException
|
||||
* @throws ReportAlreadyFinalizedException
|
||||
*/
|
||||
public function addTest(string $test): void
|
||||
{
|
||||
if ($this->finalized) {
|
||||
throw new RuntimeException('Coverage Report already finalized');
|
||||
throw new ReportAlreadyFinalizedException;
|
||||
}
|
||||
|
||||
$this->writer->startElement('covered');
|
||||
|
||||
Reference in New Issue
Block a user