-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The Drupal coding standards linter (phpcs) and PHPStan found issues in the analytics API code.
Issues Found
1. Unused variable (phpcs)
File: src/Service/RlAnalyzer.php:674
WARNING | Unused variable $center.
2. Dead catch blocks (PHPStan)
File: src/Drush/Commands/RlCommands.php
Lines 95, 141, 183, 216, 256 | Dead catch - InvalidArgumentException is never thrown in the try block.
3. Unnecessary null coalesce (PHPStan)
File: src/Service/RlAnalyzer.php:309
Offset 'rate' on array always exists and is not nullable.
Fix
- Remove unused
$centervariable - Remove dead try-catch blocks (exceptions propagate naturally)
- Extract rate variables with proper empty array check
Metadata
Metadata
Assignees
Labels
No labels