Make the Drupal module pass Drupal's coding standards

Contribution Date
Contribution Project
Contribution Details
Make the Drupal module pass Drupal's coding standards §11.2 asks for a contrib-shaped composer package. Running Drupal's own sniffs for the first time — they arrived with drupal/core-dev, installed for the media module's kernel tests — reported 129 violations: 122 lines over the 80-column limit, plus missing return descriptions, doc comments with no short description, and two method names with consecutive capitals. The line length is the bulk of it. The comments were written at ~110 columns to match the Rust in this repository; Drupal's standard is 80, and this is somebody else's ecosystem, so its conventions win. Reflowed by paragraph rather than by line. Wrapping each long line independently is what a naive pass does and it left orphaned fragments — "not what the plugin returns" on its own line, an em-dash starting the next — which is worse than the warning it fixed. These comments carry the reasoning; mangling them to satisfy a column count trades something real for something cosmetic. phpcs --standard=Drupal,DrupalPractice now exits 0, and the signer suite still passes byte-for-byte against the Rust vectors, which is what makes the reflow safe to believe.
Contribution Author
Bassam Ismail
Files count
0
Patches count
1