- Status changed to Fixed
1 day ago 2:14pm 25 December 2025
phpstan complains about one problem that it cannot add to the baseline.
Unignorable errors could not be added to the baseline:
Method Drupal\l10n_community\Form\PickGoForm::pickGo() should return array but return statement is missing.
/var/www/html/web/modules/custom/l10n_server/l10n_community/src/Form/PickGoForm.php
This is a valid observation, the method is dead if it reaches that condition.
private function pickGo(): array {
[..]
if (!empty($l10n_groups)) {
return [...];
}
}
Simply run phpstan, it will produce an inspection warning like above.
But for the actual behavior, the following must occur:
The current user has (at least) one group membership.
None of these group memberships is for a group with group type 'translation'.
The reasonable thing is to return []. We already do that if a user has no group memberships.
We should add a test for this. But currently there is no test at all for this case, and I am not even sure what the form does.
Maybe we can do this trivial fix and a `@todo` to add a test.
Follow-up to write test for this form.
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.