laravel-6 support
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -13,6 +13,7 @@ use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\Runner\PhptTestCase;
|
||||
use PHPUnit\Util\Test;
|
||||
use SebastianBergmann\CodeCoverage\Driver\Driver;
|
||||
use SebastianBergmann\CodeCoverage\Driver\PCOV;
|
||||
use SebastianBergmann\CodeCoverage\Driver\PHPDBG;
|
||||
use SebastianBergmann\CodeCoverage\Driver\Xdebug;
|
||||
use SebastianBergmann\CodeCoverage\Node\Builder;
|
||||
@@ -158,9 +159,7 @@ final class CodeCoverage
|
||||
public function getReport(): Directory
|
||||
{
|
||||
if ($this->report === null) {
|
||||
$builder = new Builder;
|
||||
|
||||
$this->report = $builder->build($this);
|
||||
$this->report = (new Builder)->build($this);
|
||||
}
|
||||
|
||||
return $this->report;
|
||||
@@ -662,8 +661,7 @@ final class CodeCoverage
|
||||
|
||||
$firstMethod = \array_shift($classOrTrait['methods']);
|
||||
$firstMethodStartLine = $firstMethod['startLine'];
|
||||
$firstMethodEndLine = $firstMethod['endLine'];
|
||||
$lastMethodEndLine = $firstMethodEndLine;
|
||||
$lastMethodEndLine = $firstMethod['endLine'];
|
||||
|
||||
do {
|
||||
$lastMethod = \array_pop($classOrTrait['methods']);
|
||||
@@ -696,7 +694,7 @@ final class CodeCoverage
|
||||
switch (\get_class($token)) {
|
||||
case \PHP_Token_COMMENT::class:
|
||||
case \PHP_Token_DOC_COMMENT::class:
|
||||
$_token = \trim($token);
|
||||
$_token = \trim((string) $token);
|
||||
$_line = \trim($lines[$token->getLine() - 1]);
|
||||
|
||||
if ($_token === '// @codeCoverageIgnore' ||
|
||||
@@ -713,7 +711,7 @@ final class CodeCoverage
|
||||
|
||||
if (!$ignore) {
|
||||
$start = $token->getLine();
|
||||
$end = $start + \substr_count($token, "\n");
|
||||
$end = $start + \substr_count((string) $token, "\n");
|
||||
|
||||
// Do not ignore the first line when there is a token
|
||||
// before the comment
|
||||
@@ -740,7 +738,7 @@ final class CodeCoverage
|
||||
case \PHP_Token_FUNCTION::class:
|
||||
/* @var \PHP_Token_Interface $token */
|
||||
|
||||
$docblock = $token->getDocblock();
|
||||
$docblock = (string) $token->getDocblock();
|
||||
|
||||
$this->ignoredLines[$fileName][] = $token->getLine();
|
||||
|
||||
@@ -763,6 +761,7 @@ final class CodeCoverage
|
||||
case \PHP_Token_OPEN_TAG::class:
|
||||
case \PHP_Token_CLOSE_TAG::class:
|
||||
case \PHP_Token_USE::class:
|
||||
case \PHP_Token_USE_FUNCTION::class:
|
||||
$this->ignoredLines[$fileName][] = $token->getLine();
|
||||
|
||||
break;
|
||||
@@ -893,12 +892,12 @@ final class CodeCoverage
|
||||
{
|
||||
$runtime = new Runtime;
|
||||
|
||||
if (!$runtime->canCollectCodeCoverage()) {
|
||||
throw new RuntimeException('No code coverage driver available');
|
||||
if ($runtime->hasPHPDBGCodeCoverage()) {
|
||||
return new PHPDBG;
|
||||
}
|
||||
|
||||
if ($runtime->isPHPDBG()) {
|
||||
return new PHPDBG;
|
||||
if ($runtime->hasPCOV()) {
|
||||
return new PCOV;
|
||||
}
|
||||
|
||||
if ($runtime->hasXdebug()) {
|
||||
@@ -957,10 +956,9 @@ final class CodeCoverage
|
||||
}
|
||||
}
|
||||
|
||||
$data = [];
|
||||
$coverage = $this->driver->stop();
|
||||
$data = [];
|
||||
|
||||
foreach ($coverage as $file => $fileCoverage) {
|
||||
foreach ($this->driver->stop() as $file => $fileCoverage) {
|
||||
if ($this->filter->isFiltered($file)) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
45
vendor/phpunit/php-code-coverage/src/Driver/PCOV.php
vendored
Normal file
45
vendor/phpunit/php-code-coverage/src/Driver/PCOV.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace SebastianBergmann\CodeCoverage\Driver;
|
||||
|
||||
/**
|
||||
* Driver for PCOV code coverage functionality.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
final class PCOV implements Driver
|
||||
{
|
||||
/**
|
||||
* Start collection of code coverage information.
|
||||
*/
|
||||
public function start(bool $determineUnusedAndDead = true): void
|
||||
{
|
||||
\pcov\start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop collection of code coverage information.
|
||||
*/
|
||||
public function stop(): array
|
||||
{
|
||||
\pcov\stop();
|
||||
|
||||
$waiting = \pcov\waiting();
|
||||
$collect = [];
|
||||
|
||||
if ($waiting) {
|
||||
$collect = \pcov\collect(\pcov\inclusive, $waiting);
|
||||
|
||||
\pcov\clear();
|
||||
}
|
||||
|
||||
return $collect;
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -38,8 +38,19 @@ final class Xdebug implements Driver
|
||||
throw new RuntimeException('This driver requires Xdebug');
|
||||
}
|
||||
|
||||
if (!\ini_get('xdebug.coverage_enable')) {
|
||||
throw new RuntimeException('xdebug.coverage_enable=On has to be set in php.ini');
|
||||
if (\version_compare(\phpversion('xdebug'), '3', '>=')) {
|
||||
$mode = \getenv('XDEBUG_MODE');
|
||||
|
||||
if ($mode === false) {
|
||||
$mode = \ini_get('xdebug.mode');
|
||||
}
|
||||
|
||||
if ($mode === false ||
|
||||
!\in_array('coverage', \explode(',', $mode), true)) {
|
||||
throw new RuntimeException('XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set');
|
||||
}
|
||||
} elseif (!\ini_get('xdebug.coverage_enable')) {
|
||||
throw new RuntimeException('xdebug.coverage_enable=On has to be set');
|
||||
}
|
||||
|
||||
if ($filter === null) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
14
vendor/phpunit/php-code-coverage/src/Filter.php
vendored
14
vendor/phpunit/php-code-coverage/src/Filter.php
vendored
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -48,7 +48,13 @@ final class Filter
|
||||
*/
|
||||
public function addFileToWhitelist(string $filename): void
|
||||
{
|
||||
$this->whitelistedFiles[\realpath($filename)] = true;
|
||||
$filename = \realpath($filename);
|
||||
|
||||
if (!$filename) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->whitelistedFiles[$filename] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,6 +89,10 @@ final class Filter
|
||||
{
|
||||
$filename = \realpath($filename);
|
||||
|
||||
if (!$filename || !isset($this->whitelistedFiles[$filename])) {
|
||||
return;
|
||||
}
|
||||
|
||||
unset($this->whitelistedFiles[$filename]);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -35,7 +35,9 @@ final class Builder
|
||||
private function addItems(Directory $root, array $items, array $tests, bool $cacheTokens): void
|
||||
{
|
||||
foreach ($items as $key => $value) {
|
||||
if (\substr($key, -2) == '/f') {
|
||||
$key = (string) $key;
|
||||
|
||||
if (\substr($key, -2) === '/f') {
|
||||
$key = \substr($key, 0, -2);
|
||||
|
||||
if (\file_exists($root->getPath() . \DIRECTORY_SEPARATOR . $key)) {
|
||||
@@ -100,7 +102,7 @@ final class Builder
|
||||
for ($i = 0; $i < $max; $i++) {
|
||||
$type = '';
|
||||
|
||||
if ($i == ($max - 1)) {
|
||||
if ($i === ($max - 1)) {
|
||||
$type = '/f';
|
||||
}
|
||||
|
||||
@@ -190,7 +192,7 @@ final class Builder
|
||||
for ($i = 0; $i < $max - 1; $i++) {
|
||||
if (!isset($paths[$i][0]) ||
|
||||
!isset($paths[$i + 1][0]) ||
|
||||
$paths[$i][0] != $paths[$i + 1][0]) {
|
||||
$paths[$i][0] !== $paths[$i + 1][0]) {
|
||||
$done = true;
|
||||
|
||||
break;
|
||||
@@ -200,7 +202,7 @@ final class Builder
|
||||
if (!$done) {
|
||||
$commonPath .= $paths[0][0];
|
||||
|
||||
if ($paths[0][0] != \DIRECTORY_SEPARATOR) {
|
||||
if ($paths[0][0] !== \DIRECTORY_SEPARATOR) {
|
||||
$commonPath .= \DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -578,7 +578,7 @@ final class File extends AbstractNode
|
||||
|
||||
private function crap(int $ccn, float $coverage): string
|
||||
{
|
||||
if ($coverage === 0) {
|
||||
if ($coverage === 0.0) {
|
||||
return (string) ($ccn ** 2 + $ccn);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -27,11 +27,11 @@ final class Clover
|
||||
$xmlDocument->formatOutput = true;
|
||||
|
||||
$xmlCoverage = $xmlDocument->createElement('coverage');
|
||||
$xmlCoverage->setAttribute('generated', (int) $_SERVER['REQUEST_TIME']);
|
||||
$xmlCoverage->setAttribute('generated', (string) $_SERVER['REQUEST_TIME']);
|
||||
$xmlDocument->appendChild($xmlCoverage);
|
||||
|
||||
$xmlProject = $xmlDocument->createElement('project');
|
||||
$xmlProject->setAttribute('timestamp', (int) $_SERVER['REQUEST_TIME']);
|
||||
$xmlProject->setAttribute('timestamp', (string) $_SERVER['REQUEST_TIME']);
|
||||
|
||||
if (\is_string($name)) {
|
||||
$xmlProject->setAttribute('name', $name);
|
||||
@@ -133,15 +133,15 @@ final class Clover
|
||||
$xmlFile->appendChild($xmlClass);
|
||||
|
||||
$xmlMetrics = $xmlDocument->createElement('metrics');
|
||||
$xmlMetrics->setAttribute('complexity', $class['ccn']);
|
||||
$xmlMetrics->setAttribute('methods', $classMethods);
|
||||
$xmlMetrics->setAttribute('coveredmethods', $coveredMethods);
|
||||
$xmlMetrics->setAttribute('conditionals', 0);
|
||||
$xmlMetrics->setAttribute('coveredconditionals', 0);
|
||||
$xmlMetrics->setAttribute('statements', $classStatements);
|
||||
$xmlMetrics->setAttribute('coveredstatements', $coveredClassStatements);
|
||||
$xmlMetrics->setAttribute('elements', $classMethods + $classStatements /* + conditionals */);
|
||||
$xmlMetrics->setAttribute('coveredelements', $coveredMethods + $coveredClassStatements /* + coveredconditionals */);
|
||||
$xmlMetrics->setAttribute('complexity', (string) $class['ccn']);
|
||||
$xmlMetrics->setAttribute('methods', (string) $classMethods);
|
||||
$xmlMetrics->setAttribute('coveredmethods', (string) $coveredMethods);
|
||||
$xmlMetrics->setAttribute('conditionals', '0');
|
||||
$xmlMetrics->setAttribute('coveredconditionals', '0');
|
||||
$xmlMetrics->setAttribute('statements', (string) $classStatements);
|
||||
$xmlMetrics->setAttribute('coveredstatements', (string) $coveredClassStatements);
|
||||
$xmlMetrics->setAttribute('elements', (string) ($classMethods + $classStatements /* + conditionals */));
|
||||
$xmlMetrics->setAttribute('coveredelements', (string) ($coveredMethods + $coveredClassStatements /* + coveredconditionals */));
|
||||
$xmlClass->appendChild($xmlMetrics);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ final class Clover
|
||||
|
||||
foreach ($lines as $line => $data) {
|
||||
$xmlLine = $xmlDocument->createElement('line');
|
||||
$xmlLine->setAttribute('num', $line);
|
||||
$xmlLine->setAttribute('num', (string) $line);
|
||||
$xmlLine->setAttribute('type', $data['type']);
|
||||
|
||||
if (isset($data['name'])) {
|
||||
@@ -171,31 +171,31 @@ final class Clover
|
||||
}
|
||||
|
||||
if (isset($data['ccn'])) {
|
||||
$xmlLine->setAttribute('complexity', $data['ccn']);
|
||||
$xmlLine->setAttribute('complexity', (string) $data['ccn']);
|
||||
}
|
||||
|
||||
if (isset($data['crap'])) {
|
||||
$xmlLine->setAttribute('crap', $data['crap']);
|
||||
$xmlLine->setAttribute('crap', (string) $data['crap']);
|
||||
}
|
||||
|
||||
$xmlLine->setAttribute('count', $data['count']);
|
||||
$xmlLine->setAttribute('count', (string) $data['count']);
|
||||
$xmlFile->appendChild($xmlLine);
|
||||
}
|
||||
|
||||
$linesOfCode = $item->getLinesOfCode();
|
||||
|
||||
$xmlMetrics = $xmlDocument->createElement('metrics');
|
||||
$xmlMetrics->setAttribute('loc', $linesOfCode['loc']);
|
||||
$xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']);
|
||||
$xmlMetrics->setAttribute('classes', $item->getNumClassesAndTraits());
|
||||
$xmlMetrics->setAttribute('methods', $item->getNumMethods());
|
||||
$xmlMetrics->setAttribute('coveredmethods', $item->getNumTestedMethods());
|
||||
$xmlMetrics->setAttribute('conditionals', 0);
|
||||
$xmlMetrics->setAttribute('coveredconditionals', 0);
|
||||
$xmlMetrics->setAttribute('statements', $item->getNumExecutableLines());
|
||||
$xmlMetrics->setAttribute('coveredstatements', $item->getNumExecutedLines());
|
||||
$xmlMetrics->setAttribute('elements', $item->getNumMethods() + $item->getNumExecutableLines() /* + conditionals */);
|
||||
$xmlMetrics->setAttribute('coveredelements', $item->getNumTestedMethods() + $item->getNumExecutedLines() /* + coveredconditionals */);
|
||||
$xmlMetrics->setAttribute('loc', (string) $linesOfCode['loc']);
|
||||
$xmlMetrics->setAttribute('ncloc', (string) $linesOfCode['ncloc']);
|
||||
$xmlMetrics->setAttribute('classes', (string) $item->getNumClassesAndTraits());
|
||||
$xmlMetrics->setAttribute('methods', (string) $item->getNumMethods());
|
||||
$xmlMetrics->setAttribute('coveredmethods', (string) $item->getNumTestedMethods());
|
||||
$xmlMetrics->setAttribute('conditionals', '0');
|
||||
$xmlMetrics->setAttribute('coveredconditionals', '0');
|
||||
$xmlMetrics->setAttribute('statements', (string) $item->getNumExecutableLines());
|
||||
$xmlMetrics->setAttribute('coveredstatements', (string) $item->getNumExecutedLines());
|
||||
$xmlMetrics->setAttribute('elements', (string) ($item->getNumMethods() + $item->getNumExecutableLines() /* + conditionals */));
|
||||
$xmlMetrics->setAttribute('coveredelements', (string) ($item->getNumTestedMethods() + $item->getNumExecutedLines() /* + coveredconditionals */));
|
||||
$xmlFile->appendChild($xmlMetrics);
|
||||
|
||||
if ($namespace === 'global') {
|
||||
@@ -217,18 +217,18 @@ final class Clover
|
||||
$linesOfCode = $report->getLinesOfCode();
|
||||
|
||||
$xmlMetrics = $xmlDocument->createElement('metrics');
|
||||
$xmlMetrics->setAttribute('files', \count($report));
|
||||
$xmlMetrics->setAttribute('loc', $linesOfCode['loc']);
|
||||
$xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']);
|
||||
$xmlMetrics->setAttribute('classes', $report->getNumClassesAndTraits());
|
||||
$xmlMetrics->setAttribute('methods', $report->getNumMethods());
|
||||
$xmlMetrics->setAttribute('coveredmethods', $report->getNumTestedMethods());
|
||||
$xmlMetrics->setAttribute('conditionals', 0);
|
||||
$xmlMetrics->setAttribute('coveredconditionals', 0);
|
||||
$xmlMetrics->setAttribute('statements', $report->getNumExecutableLines());
|
||||
$xmlMetrics->setAttribute('coveredstatements', $report->getNumExecutedLines());
|
||||
$xmlMetrics->setAttribute('elements', $report->getNumMethods() + $report->getNumExecutableLines() /* + conditionals */);
|
||||
$xmlMetrics->setAttribute('coveredelements', $report->getNumTestedMethods() + $report->getNumExecutedLines() /* + coveredconditionals */);
|
||||
$xmlMetrics->setAttribute('files', (string) \count($report));
|
||||
$xmlMetrics->setAttribute('loc', (string) $linesOfCode['loc']);
|
||||
$xmlMetrics->setAttribute('ncloc', (string) $linesOfCode['ncloc']);
|
||||
$xmlMetrics->setAttribute('classes', (string) $report->getNumClassesAndTraits());
|
||||
$xmlMetrics->setAttribute('methods', (string) $report->getNumMethods());
|
||||
$xmlMetrics->setAttribute('coveredmethods', (string) $report->getNumTestedMethods());
|
||||
$xmlMetrics->setAttribute('conditionals', '0');
|
||||
$xmlMetrics->setAttribute('coveredconditionals', '0');
|
||||
$xmlMetrics->setAttribute('statements', (string) $report->getNumExecutableLines());
|
||||
$xmlMetrics->setAttribute('coveredstatements', (string) $report->getNumExecutedLines());
|
||||
$xmlMetrics->setAttribute('elements', (string) ($report->getNumMethods() + $report->getNumExecutableLines() /* + conditionals */));
|
||||
$xmlMetrics->setAttribute('coveredelements', (string) ($report->getNumTestedMethods() + $report->getNumExecutedLines() /* + coveredconditionals */));
|
||||
$xmlProject->appendChild($xmlMetrics);
|
||||
|
||||
$buffer = $xmlDocument->saveXML();
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ final class Crap4j
|
||||
|
||||
$project = $document->createElement('project', \is_string($name) ? $name : '');
|
||||
$root->appendChild($project);
|
||||
$root->appendChild($document->createElement('timestamp', \date('Y-m-d H:i:s', (int) $_SERVER['REQUEST_TIME'])));
|
||||
$root->appendChild($document->createElement('timestamp', \date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME'])));
|
||||
|
||||
$stats = $document->createElement('stats');
|
||||
$methodsNode = $document->createElement('methods');
|
||||
@@ -86,10 +86,10 @@ final class Crap4j
|
||||
$methodNode->appendChild($document->createElement('methodName', $methodName));
|
||||
$methodNode->appendChild($document->createElement('methodSignature', \htmlspecialchars($method['signature'])));
|
||||
$methodNode->appendChild($document->createElement('fullMethod', \htmlspecialchars($method['signature'])));
|
||||
$methodNode->appendChild($document->createElement('crap', $this->roundValue($method['crap'])));
|
||||
$methodNode->appendChild($document->createElement('complexity', $method['ccn']));
|
||||
$methodNode->appendChild($document->createElement('coverage', $this->roundValue($method['coverage'])));
|
||||
$methodNode->appendChild($document->createElement('crapLoad', \round($crapLoad)));
|
||||
$methodNode->appendChild($document->createElement('crap', (string) $this->roundValue($method['crap'])));
|
||||
$methodNode->appendChild($document->createElement('complexity', (string) $method['ccn']));
|
||||
$methodNode->appendChild($document->createElement('coverage', (string) $this->roundValue($method['coverage'])));
|
||||
$methodNode->appendChild($document->createElement('crapLoad', (string) \round($crapLoad)));
|
||||
|
||||
$methodsNode->appendChild($methodNode);
|
||||
}
|
||||
@@ -97,10 +97,10 @@ final class Crap4j
|
||||
}
|
||||
|
||||
$stats->appendChild($document->createElement('name', 'Method Crap Stats'));
|
||||
$stats->appendChild($document->createElement('methodCount', $fullMethodCount));
|
||||
$stats->appendChild($document->createElement('crapMethodCount', $fullCrapMethodCount));
|
||||
$stats->appendChild($document->createElement('crapLoad', \round($fullCrapLoad)));
|
||||
$stats->appendChild($document->createElement('totalCrap', $fullCrap));
|
||||
$stats->appendChild($document->createElement('methodCount', (string) $fullMethodCount));
|
||||
$stats->appendChild($document->createElement('crapMethodCount', (string) $fullCrapMethodCount));
|
||||
$stats->appendChild($document->createElement('crapLoad', (string) \round($fullCrapLoad)));
|
||||
$stats->appendChild($document->createElement('totalCrap', (string) $fullCrap));
|
||||
|
||||
$crapMethodPercent = 0;
|
||||
|
||||
@@ -108,7 +108,7 @@ final class Crap4j
|
||||
$crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount);
|
||||
}
|
||||
|
||||
$stats->appendChild($document->createElement('crapMethodPercent', $crapMethodPercent));
|
||||
$stats->appendChild($document->createElement('crapMethodPercent', (string) $crapMethodPercent));
|
||||
|
||||
$root->appendChild($stats);
|
||||
$root->appendChild($methodsNode);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -118,7 +118,7 @@ final class Facade
|
||||
*/
|
||||
private function copyFiles(string $target): void
|
||||
{
|
||||
$dir = $this->getDirectory($target . '.css');
|
||||
$dir = $this->getDirectory($target . '_css');
|
||||
|
||||
\copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css');
|
||||
\copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css');
|
||||
@@ -126,11 +126,11 @@ final class Facade
|
||||
\copy($this->templatePath . 'css/custom.css', $dir . 'custom.css');
|
||||
\copy($this->templatePath . 'css/octicons.css', $dir . 'octicons.css');
|
||||
|
||||
$dir = $this->getDirectory($target . '.icons');
|
||||
$dir = $this->getDirectory($target . '_icons');
|
||||
\copy($this->templatePath . 'icons/file-code.svg', $dir . 'file-code.svg');
|
||||
\copy($this->templatePath . 'icons/file-directory.svg', $dir . 'file-directory.svg');
|
||||
|
||||
$dir = $this->getDirectory($target . '.js');
|
||||
$dir = $this->getDirectory($target . '_js');
|
||||
\copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js');
|
||||
\copy($this->templatePath . 'js/popper.min.js', $dir . 'popper.min.js');
|
||||
\copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -265,6 +265,13 @@ abstract class Renderer
|
||||
);
|
||||
}
|
||||
|
||||
if ($runtime->hasPCOV() && !$runtime->hasPHPDBGCodeCoverage()) {
|
||||
$buffer .= \sprintf(
|
||||
' with <a href="https://github.com/krakjoe/pcov">PCOV %s</a>',
|
||||
\phpversion('pcov')
|
||||
);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -76,7 +76,7 @@ final class Directory extends Renderer
|
||||
|
||||
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
|
||||
|
||||
$data['icon'] = \sprintf('<img src="%s.icons/file-directory.svg" class="octicon" />', $up);
|
||||
$data['icon'] = \sprintf('<img src="%s_icons/file-directory.svg" class="octicon" />', $up);
|
||||
} else {
|
||||
$data['name'] = \sprintf(
|
||||
'<a href="%s.html">%s</a>',
|
||||
@@ -86,7 +86,7 @@ final class Directory extends Renderer
|
||||
|
||||
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
|
||||
|
||||
$data['icon'] = \sprintf('<img src="%s.icons/file-code.svg" class="octicon" />', $up);
|
||||
$data['icon'] = \sprintf('<img src="%s_icons/file-code.svg" class="octicon" />', $up);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -339,14 +339,14 @@ final class File extends Renderer
|
||||
|
||||
if (!empty($popoverTitle)) {
|
||||
$popover = \sprintf(
|
||||
' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"',
|
||||
' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
|
||||
$popoverTitle,
|
||||
\htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags)
|
||||
);
|
||||
}
|
||||
|
||||
$lines .= \sprintf(
|
||||
' <tr%s%s><td><div align="right"><a name="%d"></a><a href="#%d">%d</a></div></td><td class="codeLine">%s</td></tr>' . "\n",
|
||||
' <tr%s><td%s><div align="right"><a name="%d"></a><a href="#%d">%d</a></div></td><td class="codeLine">%s</td></tr>' . "\n",
|
||||
$trClass,
|
||||
$popover,
|
||||
$i,
|
||||
|
File diff suppressed because one or more lines are too long
@@ -4,10 +4,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Dashboard for {{full_path}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/nv.d3.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/nv.d3.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@@ -137,9 +137,9 @@
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}.js/d3.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}.js/nv.d3.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/d3.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/nv.d3.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
nv.addGraph(function() {
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Code Coverage for {{full_path}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/octicons.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/octicons.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Code Coverage for {{full_path}}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="{{path_to_root}}.css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/octicons.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}.css/custom.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/octicons.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="{{path_to_root}}_css/custom.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@@ -64,9 +64,9 @@
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="{{path_to_root}}.js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}.js/popper.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}.js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}.js/file.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/popper.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="{{path_to_root}}_js/file.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
@@ -31,6 +31,7 @@
|
||||
.on({
|
||||
'mouseenter.popover': function () {
|
||||
var $target = $(this);
|
||||
var $container = $target.children().first();
|
||||
|
||||
$target.data('popover-hover', true);
|
||||
|
||||
@@ -40,7 +41,7 @@
|
||||
}
|
||||
|
||||
// show the popover
|
||||
$target.popover('show');
|
||||
$container.popover('show');
|
||||
|
||||
// register mouse events on the popover
|
||||
$target.next('.popover:not(.popover-initialized)')
|
||||
@@ -49,13 +50,13 @@
|
||||
$target.data('popover-hover', true);
|
||||
},
|
||||
'mouseleave': function () {
|
||||
hidePopover($target);
|
||||
hidePopover($container);
|
||||
}
|
||||
})
|
||||
.addClass('popover-initialized');
|
||||
},
|
||||
'mouseleave.popover': function () {
|
||||
hidePopover($(this));
|
||||
hidePopover($(this).children().first());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -34,9 +34,9 @@ $filter = $coverage->filter();
|
||||
$filter->setWhitelistedFiles(%s);
|
||||
|
||||
return $coverage;',
|
||||
\var_export($coverage->getData(true), 1),
|
||||
\var_export($coverage->getTests(), 1),
|
||||
\var_export($filter->getWhitelistedFiles(), 1)
|
||||
\var_export($coverage->getData(true), true),
|
||||
\var_export($coverage->getTests(), true),
|
||||
\var_export($filter->getWhitelistedFiles(), true)
|
||||
);
|
||||
|
||||
if ($target !== null) {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -42,6 +42,11 @@ final class BuildInformation
|
||||
$driverNode->setAttribute('name', 'xdebug');
|
||||
$driverNode->setAttribute('version', \phpversion('xdebug'));
|
||||
}
|
||||
|
||||
if ($runtime->hasPCOV()) {
|
||||
$driverNode->setAttribute('name', 'pcov');
|
||||
$driverNode->setAttribute('version', \phpversion('pcov'));
|
||||
}
|
||||
}
|
||||
|
||||
public function setBuildTime(\DateTime $date): void
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -68,7 +68,7 @@ final class Facade
|
||||
{
|
||||
$buildNode = $this->project->getBuildInformation();
|
||||
$buildNode->setRuntimeInformation(new Runtime());
|
||||
$buildNode->setBuildTime(\DateTime::createFromFormat('U', $_SERVER['REQUEST_TIME']));
|
||||
$buildNode->setBuildTime(\DateTime::createFromFormat('U', (string) $_SERVER['REQUEST_TIME']));
|
||||
$buildNode->setGeneratorVersions($this->phpUnitVersion, Version::id());
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ final class Facade
|
||||
continue;
|
||||
}
|
||||
|
||||
$coverage = $fileReport->getLineCoverage($line);
|
||||
$coverage = $fileReport->getLineCoverage((string) $line);
|
||||
|
||||
foreach ($tests as $test) {
|
||||
$coverage->addTest($test);
|
||||
@@ -181,7 +181,7 @@ final class Facade
|
||||
$unit['executedLines']
|
||||
);
|
||||
|
||||
$unitObject->setCrap($unit['crap']);
|
||||
$unitObject->setCrap((float) $unit['crap']);
|
||||
|
||||
$unitObject->setPackage(
|
||||
$unit['package']['fullPackage'],
|
||||
@@ -195,12 +195,12 @@ final class Facade
|
||||
foreach ($unit['methods'] as $method) {
|
||||
$methodObject = $unitObject->addMethod($method['methodName']);
|
||||
$methodObject->setSignature($method['signature']);
|
||||
$methodObject->setLines($method['startLine'], $method['endLine']);
|
||||
$methodObject->setLines((string) $method['startLine'], (string) $method['endLine']);
|
||||
$methodObject->setCrap($method['crap']);
|
||||
$methodObject->setTotals(
|
||||
$method['executableLines'],
|
||||
$method['executedLines'],
|
||||
$method['coverage']
|
||||
(string) $method['executableLines'],
|
||||
(string) $method['executedLines'],
|
||||
(string) $method['coverage']
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -210,9 +210,9 @@ final class Facade
|
||||
$functionObject = $report->getFunctionObject($function['functionName']);
|
||||
|
||||
$functionObject->setSignature($function['signature']);
|
||||
$functionObject->setLines($function['startLine']);
|
||||
$functionObject->setLines((string) $function['startLine']);
|
||||
$functionObject->setCrap($function['crap']);
|
||||
$functionObject->setTotals($function['executableLines'], $function['executedLines'], $function['coverage']);
|
||||
$functionObject->setTotals((string) $function['executableLines'], (string) $function['executedLines'], (string) $function['coverage']);
|
||||
}
|
||||
|
||||
private function processTests(array $tests): void
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -40,7 +40,7 @@ final class Tests
|
||||
|
||||
$node->setAttribute('name', $test);
|
||||
$node->setAttribute('size', $result['size']);
|
||||
$node->setAttribute('result', (int) $result['status']);
|
||||
$node->setAttribute('result', (string) $result['status']);
|
||||
$node->setAttribute('status', $this->codeMap[(int) $result['status']]);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -87,54 +87,54 @@ final class Totals
|
||||
|
||||
public function setNumLines(int $loc, int $cloc, int $ncloc, int $executable, int $executed): void
|
||||
{
|
||||
$this->linesNode->setAttribute('total', $loc);
|
||||
$this->linesNode->setAttribute('comments', $cloc);
|
||||
$this->linesNode->setAttribute('code', $ncloc);
|
||||
$this->linesNode->setAttribute('executable', $executable);
|
||||
$this->linesNode->setAttribute('executed', $executed);
|
||||
$this->linesNode->setAttribute('total', (string) $loc);
|
||||
$this->linesNode->setAttribute('comments', (string) $cloc);
|
||||
$this->linesNode->setAttribute('code', (string) $ncloc);
|
||||
$this->linesNode->setAttribute('executable', (string) $executable);
|
||||
$this->linesNode->setAttribute('executed', (string) $executed);
|
||||
$this->linesNode->setAttribute(
|
||||
'percent',
|
||||
$executable === 0 ? 0 : \sprintf('%01.2F', Util::percent($executed, $executable))
|
||||
$executable === 0 ? '0' : \sprintf('%01.2F', Util::percent($executed, $executable))
|
||||
);
|
||||
}
|
||||
|
||||
public function setNumClasses(int $count, int $tested): void
|
||||
{
|
||||
$this->classesNode->setAttribute('count', $count);
|
||||
$this->classesNode->setAttribute('tested', $tested);
|
||||
$this->classesNode->setAttribute('count', (string) $count);
|
||||
$this->classesNode->setAttribute('tested', (string) $tested);
|
||||
$this->classesNode->setAttribute(
|
||||
'percent',
|
||||
$count === 0 ? 0 : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
$count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
);
|
||||
}
|
||||
|
||||
public function setNumTraits(int $count, int $tested): void
|
||||
{
|
||||
$this->traitsNode->setAttribute('count', $count);
|
||||
$this->traitsNode->setAttribute('tested', $tested);
|
||||
$this->traitsNode->setAttribute('count', (string) $count);
|
||||
$this->traitsNode->setAttribute('tested', (string) $tested);
|
||||
$this->traitsNode->setAttribute(
|
||||
'percent',
|
||||
$count === 0 ? 0 : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
$count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
);
|
||||
}
|
||||
|
||||
public function setNumMethods(int $count, int $tested): void
|
||||
{
|
||||
$this->methodsNode->setAttribute('count', $count);
|
||||
$this->methodsNode->setAttribute('tested', $tested);
|
||||
$this->methodsNode->setAttribute('count', (string) $count);
|
||||
$this->methodsNode->setAttribute('tested', (string) $tested);
|
||||
$this->methodsNode->setAttribute(
|
||||
'percent',
|
||||
$count === 0 ? 0 : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
$count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
);
|
||||
}
|
||||
|
||||
public function setNumFunctions(int $count, int $tested): void
|
||||
{
|
||||
$this->functionsNode->setAttribute('count', $count);
|
||||
$this->functionsNode->setAttribute('tested', $tested);
|
||||
$this->functionsNode->setAttribute('count', (string) $count);
|
||||
$this->functionsNode->setAttribute('tested', (string) $tested);
|
||||
$this->functionsNode->setAttribute(
|
||||
'percent',
|
||||
$count === 0 ? 0 : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
$count === 0 ? '0' : \sprintf('%01.2F', Util::percent($tested, $count))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -25,14 +25,14 @@ final class Unit
|
||||
|
||||
public function setLines(int $start, int $executable, int $executed): void
|
||||
{
|
||||
$this->contextNode->setAttribute('start', $start);
|
||||
$this->contextNode->setAttribute('executable', $executable);
|
||||
$this->contextNode->setAttribute('executed', $executed);
|
||||
$this->contextNode->setAttribute('start', (string) $start);
|
||||
$this->contextNode->setAttribute('executable', (string) $executable);
|
||||
$this->contextNode->setAttribute('executed', (string) $executed);
|
||||
}
|
||||
|
||||
public function setCrap(float $crap): void
|
||||
{
|
||||
$this->contextNode->setAttribute('crap', $crap);
|
||||
$this->contextNode->setAttribute('crap', (string) $crap);
|
||||
}
|
||||
|
||||
public function setPackage(string $full, string $package, string $sub, string $category): void
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
/*
|
||||
* This file is part of the php-code-coverage package.
|
||||
*
|
||||
@@ -21,7 +21,7 @@ final class Version
|
||||
public static function id(): string
|
||||
{
|
||||
if (self::$version === null) {
|
||||
$version = new VersionId('6.1.4', \dirname(__DIR__));
|
||||
$version = new VersionId('7.0.15', \dirname(__DIR__));
|
||||
self::$version = $version->getVersion();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user