Issue #3615245: Say "tariff" below the type level too: the tier and rate synonyms survive in locals, prose, one public method and a broken api.php example
One word for one thing, everywhere below the type level. 178 files; no entity type, field, config key, route, service id or plugin id moves, so nothing on a site changes and there is no migration.
Each identifier is named for what it holds, which is why this was done by hand rather than substituted: $tariff for a resource tariff, $slot_tariff for a session's override, $tariff_id where it is an id, $offer/$offers for a row of an availability entry, $row for a payload row, $label where it was only ever a string. The two were spelled the same before, so a search and replace would have hidden the distinction the module's three tariff scopes depend on.
Renamed: policiesForTier() to policiesForSlotTariff() (its parameter was already typed for one), tierState() to tariffState(), sumConsumingByRate() to sumConsumingByTariff(), tiersByGrade() to tariffsWithGrades() (it sat one letter from the existing tariffsByGrade(), which groups them the other way round, and the docblock now says so), the byTier payload key to byTariff across PHP and JS together, and TierIdentityTest to SlotTariffIdentityTest. In the tests, 36 method names and the untiered family, which becomes "naming no tariff" rather than a coined word.
Three defects the sweep uncovered, all fixed here:
hook_yoyaku_summary_alter()documented atier_keyon every ticket.TransactionSummaryhas never built it: a ticket carriestariff,tariff_id,slot_idandresource_id. Anyone who copied the worked example got an undefined array key and a NULL price, silently, since an unpriced ticket is a legal answer. The contract and the example now match the code.BookingManagerInterfacesaidfindAvailability()returns the same "'available' and 'tiers' shape" asavailabilityMap(), contradicting its own@returnannotation two lines above; the key istariffs.SlotBookingFormcarried that error into a real fallback,['available' => NULL, 'tiers' => []], where the code reads$entry['tariffs']. Unreachable today, because the map keys every slot it is given, but wrong.- Two French strings had a placeholder their msgid does not have:
msgstr "Créneau nº@id : @tier, @when (@avail)"againstmsgid "Slot #@id: @tariff, ...". Those rendered the literal text@tierto a French visitor. Every msgid/msgstr pair in the file is now checked to carry the same placeholders, and all 1455 do.
Translations. Twelve interface strings changed, seven of them in JavaScript where the placeholder name is part of the msgid, so @rate became @tariff on both sides of each pair. The French already read tarif throughout, so no translation needed rewriting. Three msgids were genuinely stale, verified by searching php, module, twig, js and yml for each: an earlier pass of mine checked only PHP and Twig and would have deleted five strings that JavaScript still emits.
JavaScript and CSS. venue-map.js and calendar.js swept, and the CSS hooks with them: ysm-pool-rate to ysm-pool-offer in both the JS that writes them and the stylesheet that matches them.
Verified: phpcs clean but for one pre-existing yoyaku_node.install warning; phpstan clean but for the eight new.static findings CI ignores; eslint clean; stylelint clean but for two pre-existing property-order errors identical in the base; cspell's remaining words are all pre-existing and absent only from my local dictionary copy. SeatTogetherTest, BookingManagerTest, SlotTariffIdentityTest, BookingCartTest and TransactionSummaryTest all pass; the pipeline runs the rest.
No test's assertions changed. A renamed test that also changed what it asserts would hide a behavior change inside a sweep, so the suite passing unchanged is the whole proof.