fix: #3305083 Fix phpcs and Stylelint errors

Description

Fixes the errors CI's phpcs and Stylelint jobs report, and makes the phpcs, phpstan and Stylelint jobs fail the pipeline. CSpell is fixed in !82 (merged); ESLint gets its own MR.

Issue: https://www.drupal.org/project/entity_embed/issues/3305083

  • phpcs: phpcbf's fixes, plus docblocks, long lines and parameter docs fixed by hand. EditEmbeddedEntity.php is left to !80 (merged), which rewrites it. The CKEditor 4 to 5 upgrade plugin, which #3639510 removes, gets phpcbf's fixes and phpcs:ignore for the method names from core's interface.
  • The "No display options available" error showed a literal %entity-type instead of the entity type's name.
  • EntityEmbedDialog::registerJSCallback() keeps its name (released public API) with a phpcs:ignore.
  • The CKEditor 5 plugin's elements are split into several <drupal-entity …> entries, in the same attribute order.
  • The commented-out test case in ConfigurationUiTest is now a @todo linking #3415080.
  • Stylelint: quoted the attribute selector values in css/entity_embed.editor.css.
  • .gitlab-ci.yml: _PHPCS_ALLOW_FAILURE, _PHPSTAN_ALLOW_FAILURE and _STYLELINT_ALLOW_FAILURE set to '0'.

Replaces !13 (closed) and !45 (closed); this MR builds on their work, so their contributors are credited on the issue.

AI disclosure

Claude Code (Claude Opus 5.5) fixed the errors phpcbf couldn't, reviewed phpcbf's changes and wrote this description. I decided to split the lint fixes into one MR per tool and to leave files other open MRs remove or rewrite, reviewed the changes, and ran the kernel, functional and CKEditor 5 integration tests, phpcs and phpstan locally.

🤖 Generated with Claude Code

Edited by Dave Reid

Merge request reports

Loading
Loading