Skip to content

Conversation

@jjroelofs
Copy link
Contributor

Summary

Removes unused $center variable from the Wilson score interval calculation in RlAnalyzer.php.

Changes

The $center variable was calculated as part of the Wilson score interval formula but was never used. Only $spread is needed to compute the confidence interval width.

Lint Output (before fix)

FILE: src/Service/RlAnalyzer.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 674 | WARNING | Unused variable $center.
----------------------------------------------------------------------

Test Plan

  • Docker lint check passes (docker compose run --rm drupal-lint)

Fixes #28

@jjroelofs jjroelofs force-pushed the fix/lint-unused-variable branch from 4bb25c3 to 89516db Compare January 28, 2026 13:03
- Remove unused $center variable in RlAnalyzer.php
- Remove dead try-catch blocks in RlCommands.php (InvalidArgumentException never thrown)
- Fix null coalesce by extracting rate variables with empty array check

Fixes #28
@jjroelofs jjroelofs force-pushed the fix/lint-unused-variable branch from 89516db to 8c18b2a Compare January 28, 2026 13:05
@jjroelofs jjroelofs merged commit dc5557c into feat/analytics-api-1.x Jan 28, 2026
2 checks passed
@jjroelofs jjroelofs deleted the fix/lint-unused-variable branch January 28, 2026 13:09
jjroelofs added a commit that referenced this pull request Jan 28, 2026
jjroelofs added a commit that referenced this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants