Skip to content

Commit

Permalink
fix abstractness calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
DeGraciaMathieu committed Nov 10, 2024
1 parent 81785c5 commit 14e399d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ class AbstractnessCalculator implements Calculator
{
public static function calculate(array $metric): string
{
if ($metric['abstractness'] > 0.7) {
$ratio = $metric['abstractness']['ratio'];

if ($ratio > 0.7) {
return 'abstract';
}

if ($metric['abstractness'] < 0.3) {
if ($ratio < 0.3) {
return 'concrete';
}

Expand Down

0 comments on commit 14e399d

Please sign in to comment.