Problem
patterns.md bans PHP alternative/template syntax (if():/endif;), ternary (? :) and Elvis (?:) operators, JS ternaries / || default short-circuit assignment / braceless single-line if, and ?? with a function-call operand. Multiple verified deviations exist:
- PHP alt syntax:
web/Go2My.Link/_admin/public_html/pages/security/breach-response.php (lines 148, 172, 190, 199, 204, 209, 320 — the only Component A page using template syntax); eight email templates under web/_includes/email_templates/ (e.g. verify_email.php:68,73; same in password_changed.php, password_reset.php, new_login_alert.php, org_invitation.php, breach_notification.php, data_export_ready.php, data_deletion_requested.php).
- Ternary:
web/_functions/org.php:460-461,667; breach_response.php:518; account_types.php:359; breach-response.php:113,166,313; contact/index.php:110.
- Elvis (
?:): org.php:151,316,763,988,1174; account_types.php:104,463; breach_response.php:323 (double Elvis); profile/sessions/index.php:220.
- JS shorthand:
js/cookie-consent.js:28,31,92,142-144,151; js/app.js:87,165,250; js/theme.js:173,178; header.php:197-199 inline script; landing pages (Go2My.Link 377/379, Lnks.page 381, validating.php 104/231/246, expired.php 105/215, 404.php 79).
?? with function call: $currentYear = $currentYear ?? date('Y'); across ~22 HTML/AMP email templates.
This is style-rule conformance (not a vulnerability), but it is the largest cluster of repeated house-rule deviations and is worth one coordinated cleanup pass.
Recommended fix
Convert each construct to its full form per patterns.md: if () { } else { } blocks (incl. HTML-template context), temporary variables assigned via if/else instead of ternary/Elvis, explicit JS if/else with braces, and if (!isset(...)) { ... = date('Y'); } for the year default. Consider adding Generic.ControlStructures/Generic.Functions sniffs so phpcs flags future regressions.
Acceptance criteria
Filed from the 2026-06-04 deployment-readiness audit — see docs/AUDIT_2026-06-04.md.
Problem
patterns.mdbans PHP alternative/template syntax (if():/endif;), ternary (? :) and Elvis (?:) operators, JS ternaries /|| defaultshort-circuit assignment / braceless single-lineif, and??with a function-call operand. Multiple verified deviations exist:web/Go2My.Link/_admin/public_html/pages/security/breach-response.php(lines 148, 172, 190, 199, 204, 209, 320 — the only Component A page using template syntax); eight email templates underweb/_includes/email_templates/(e.g.verify_email.php:68,73; same inpassword_changed.php,password_reset.php,new_login_alert.php,org_invitation.php,breach_notification.php,data_export_ready.php,data_deletion_requested.php).web/_functions/org.php:460-461,667;breach_response.php:518;account_types.php:359;breach-response.php:113,166,313;contact/index.php:110.?:):org.php:151,316,763,988,1174;account_types.php:104,463;breach_response.php:323(double Elvis);profile/sessions/index.php:220.js/cookie-consent.js:28,31,92,142-144,151;js/app.js:87,165,250;js/theme.js:173,178;header.php:197-199inline script; landing pages (Go2My.Link377/379,Lnks.page381,validating.php104/231/246,expired.php105/215,404.php79).??with function call:$currentYear = $currentYear ?? date('Y');across ~22 HTML/AMP email templates.This is style-rule conformance (not a vulnerability), but it is the largest cluster of repeated house-rule deviations and is worth one coordinated cleanup pass.
Recommended fix
Convert each construct to its full form per
patterns.md:if () { } else { }blocks (incl. HTML-template context), temporary variables assigned viaif/elseinstead of ternary/Elvis, explicit JSif/elsewith braces, andif (!isset(...)) { ... = date('Y'); }for the year default. Consider addingGeneric.ControlStructures/Generic.Functionssniffs so phpcs flags future regressions.Acceptance criteria
if():/endif;/foreach():etc. in the listed PHP files? :or?:operators in the listed PHP files|| defaultassignment, or bracelessifin the listed JS/inline scripts?? date(...)replaced withif (!isset(...))in the email templatesFiled from the 2026-06-04 deployment-readiness audit — see
docs/AUDIT_2026-06-04.md.