Skip to content

Commit 14e399d

Browse files
fix abstractness calculation
1 parent 81785c5 commit 14e399d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/Presenter/Analyze/Summary/Calculators/AbstractnessCalculator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ class AbstractnessCalculator implements Calculator
88
{
99
public static function calculate(array $metric): string
1010
{
11-
if ($metric['abstractness'] > 0.7) {
11+
$ratio = $metric['abstractness']['ratio'];
12+
13+
if ($ratio > 0.7) {
1214
return 'abstract';
1315
}
1416

15-
if ($metric['abstractness'] < 0.3) {
17+
if ($ratio < 0.3) {
1618
return 'concrete';
1719
}
1820

0 commit comments

Comments
 (0)