phpcs: Enforce consistent placement of `cspell:ignore` comments to reduce merge conflict frequency
### Overview `cspell:ignore` comments in PHP files are placed inconsistently — some appear before the `namespace` declaration, some after the `use` statements, and some right after the namespace. Out of 28 file-level occurrences across the codebase, only 3 follow the preferred convention (right after the namespace, before `use` statements). The remaining 25 are split between appearing before the namespace (14) and after the `use` block (9), with 2 in a transitional state in test fixture scope. ### Proposed resolution Add a custom phpcs sniff (`Canvas.Commenting.CspellIgnorePlacement`) that enforces file-level `cspell:ignore` comments to be placed on the line immediately after the `namespace` declaration — before any `use` statements. The sniff: - Registers for `T_COMMENT` tokens and checks for the `cspell:ignore` substring. - Skips comments inside class, trait, interface, enum, or function scope — inline `cspell:ignore` next to a deliberate misspelling in test data is allowed. - Skips files without a `namespace` declaration (e.g. update fixtures). - Reports an error when a file-level `cspell:ignore` is not on the expected line (namespace semicolon line + 2). Fixture files under `tests/fixtures/` are excluded in the ruleset since they lack namespace declarations. Then fix the ~23 existing violations. ### User interface changes None. ### Remaining tasks - Review and land the sniff. - Move all existing file-level `cspell:ignore` comments to the canonical position (right after namespace).
issue