Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function inspect(?PathInspectionConfig $fileConfig, FileMetric $metric):
$customCoverage = $fileConfig->getMinimumCoverage();

// custom coverage is lower than global coverage, and file is above global coverage
if ($customCoverage < $globalCoverage && $metric->getCoverage() >= $globalCoverage) {
if ($customCoverage <= $globalCoverage && $metric->getCoverage() >= $globalCoverage) {
return new Failure($metric, $fileConfig->getMinimumCoverage(), Failure::UNNECESSARY_CUSTOM_COVERAGE);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Lib/Config/ConfigFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testCreateInspectConfigDuplicateOutputReport(): void
touch($coveragePath);

$input = $this->createMock(InputInterface::class);
$input->expects(self::exactly(5))->method('getOption')->willReturn($configPath, null, null, null);
$input->expects(self::exactly(5))->method('getOption')->willReturn($configPath, null, null, null, null);
$input->expects(self::once())->method('getArgument')->with('coverage')->willReturn([$coveragePath]);

$config = $this->factory->createInspectConfig($input);
Expand Down