Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Aug 4, 2020
1 parent b7936b9 commit b46817a
Show file tree
Hide file tree
Showing 9 changed files with 18,526 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Converters/PhpUnitCloverStatsTcConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function toInternalMetric(string $sourceCode): Metrics

$data['CRAPTotal'] = $crapSummary;
$data['CRAPAmount'] = $crapAmount;
$data['CRAPMaximum'] = max($crapValues);
$data['CRAPMaximum'] = count($crapValues) > 0 ? max($crapValues) : 0;
$data['CRAPAverage'] = self::percent($crapSummary, $crapValuesCount) / 100;
$data['CRAPPercent'] = self::percent($crapAmount, $crapValuesCount);

Expand Down
9 changes: 7 additions & 2 deletions tests/Tools/Fixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ class Fixtures
public const PSALM_SONARQUBE = self::ROOT_ORIG . '/psalm/sonarqube.json';
public const PSALM_XML = self::ROOT_ORIG . '/psalm/xml.xml';

public const PHP_DEPEND_XML = self::ROOT_ORIG . '/phpdepend/pdepend.xml';
public const PHP_DEPEND_XML = self::ROOT_ORIG . '/pdepend/pdepend-old.xml';
public const PHP_SUMMARY_XML = self::ROOT_ORIG . '/pdepend/summary.xml';
public const PHP_DEPENDENCY_XML = self::ROOT_ORIG . '/pdepend/dependency.xml';
public const PHP_JDEPEND_XML = self::ROOT_ORIG . '/pdepend/jdepend.xml';

public const PHP_METRICS_XML = self::ROOT_ORIG . '/phpmetrics/phpmetrics.xml';
public const PHP_METRICS_XML = self::ROOT_ORIG . '/phpmetrics/phpmetrics.xml';
public const PHP_METRICS_JSON = self::ROOT_ORIG . '/phpmetrics/phpmetrics.json';
public const PHP_METRICS_PMD_XML = self::ROOT_ORIG . '/phpmetrics/pmd.xml';
}
2,362 changes: 2,362 additions & 0 deletions tests/fixtures/origin/pdepend/dependency.xml

Large diffs are not rendered by default.

864 changes: 864 additions & 0 deletions tests/fixtures/origin/pdepend/jdepend.xml

Large diffs are not rendered by default.

2,174 changes: 2,174 additions & 0 deletions tests/fixtures/origin/pdepend/summary.xml

Large diffs are not rendered by default.

Loading

0 comments on commit b46817a

Please sign in to comment.