Skip to content

Commit

Permalink
Merge branch '9.6' into 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 11, 2023
2 parents 599b332 + 324512e commit 62a25fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class MigrationBuilder
IntroduceCoverageElement::class,
MoveAttributesFromRootToCoverage::class,
MoveAttributesFromFilterWhitelistToCoverage::class,
MoveWhitelistDirectoriesToCoverage::class,
MoveWhitelistIncludesToCoverage::class,
MoveWhitelistExcludesToCoverage::class,
RemoveEmptyFilter::class,
CoverageCloverToReport::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class MoveWhitelistDirectoriesToCoverage implements Migration
final class MoveWhitelistIncludesToCoverage implements Migration
{
/**
* @throws MigrationException
Expand All @@ -38,7 +38,11 @@ public function migrate(DOMDocument $document): void
$coverage->appendChild($include);

foreach (SnapshotNodeList::fromNodeList($whitelist->childNodes) as $child) {
if (!$child instanceof DOMElement || $child->nodeName !== 'directory') {
if (!$child instanceof DOMElement) {
continue;
}

if (!($child->nodeName === 'directory' || $child->nodeName === 'file')) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<file>file.php</file>
</whitelist>
</filter>
</phpunit>

0 comments on commit 62a25fa

Please sign in to comment.