Issue #3619047: Name methods with a verb the way core does, and fix the canceled CSS the last rename orphaned
This is the merge request for [#3619047], a second naming audit against the same corpus of 24,173 core identifiers used in [#3618935].
A real defect first
[#3618935] renamed the stored state value cancelled to canceled, and the status tag builds its class from that value with Html::getClass(). That sweep covered .php, .yml, .twig and .js but not .css, so cards.css still matched three selectors nothing emits: a canceled instance and a canceled task rendered with no status colour and no ::before marker. Fixed.
Methods lead with a verb
Core leads roughly 90% of its method names with a verb. 101 of ours led with a noun:
- 95 value accessors take
get*, includingAssignmentInterface::getCandidates(),RecipientInterface::getAccount()andDeadlineProviderInterface::getDeadlineFor(). - 15 of those return a render array and take core's
build*:buildCommentField(),buildOutcomeButtons(),buildStatusColumn(),buildLandingPage()and the rest. - 5 booleans now read as questions:
isAccountCandidate(),accountParticipatesIn(),hasIncomingFlows(),hasOutgoingFlows(),isNodeReferenced(). - 1 is
signalTokenRemotely().
Deliberately left: the third-person predicates notifies(), parks(), rearms(), overlaps(), skipsLanding(), resetsEarlier(). They already read as questions, as core's own applies() does.
Four renames reverted after reading the code
Worth calling out, because a mechanical get* pass gets these wrong:
signal()returnsvoidand signals a token, sogetSignal()inverted its meaning.- The four incident controller actions return a
RedirectResponseand act on the incident. taskAccess()is a route access callback.InboxController's route callback returns a render array, so it isbuildInbox()— and its routing entry moved with it. A.ymlreference is writtenClass::methodwith no parentheses, so a rename anchored on the parenthesis silently misses it. That was checked across every.ymland.twigin the module; this was the only one.
Also folded in
The last two act identifiers [#3618935] missed: the views field plugin ids orchestra_instance_act_link and orchestra_task_act_link with their views.field.* schema keys, plus two Twig @see lines still naming the preprocess methods under their pre-rename names.
Verification
- phpcs
--standard=Drupal,DrupalPracticeover the module root: 0 errors, and the single warning1.xalready had. - phpstan level 3:
[OK] No errors. - Every
.yml/.twig::methodreference cross-checked against the declarations; 0 dangling. - Translations unaffected: these are identifiers, not translatable strings.
Renames on the @api surface
Six of these land on @api interfaces that a site's own plugins may implement: AudienceInterface::getCandidates(), getRecipients() and getViewerTokens(), InteractionInterface::getSignalOutcomes(), and DeadlineProviderInterface::getDeadlineFor() and shouldRearm(). A module implementing any of them follows the rename in the same release. The module is pre-1.0 and alpha releases are reinstall-only, so no update path is provided.
AI-Generated: Yes (Claude Code ran the audit, wrote these renames, and ran the linters. I reviewed the work before posting it.)