- Status changed to Needs work
4 months ago 5:50pm 19 July 2024 - ๐ต๐ญPhilippines roberttabigue
Hi @DamienMcKenna,
After applying your Patch #5 to the EVA: Entity Views Attachment module against 7.x-1.x-dev on Drupal 10, not all of the PHPCS errors were resolved.
See below:FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/eva/eva.module --------------------------------------------------------------------------------------------------- FOUND 8 ERRORS AND 1 WARNING AFFECTING 9 LINES --------------------------------------------------------------------------------------------------- 69 | ERROR | [x] list(...) is forbidden, use [...] instead. 97 | ERROR | [x] list(...) is forbidden, use [...] instead. 161 | ERROR | [x] list(...) is forbidden, use [...] instead. 168 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines 221 | ERROR | [x] list(...) is forbidden, use [...] instead. 242 | ERROR | [x] Use null coalesce operator instead of ternary operator. 245 | ERROR | [x] Use null coalesce operator instead of ternary operator. 258 | ERROR | [ ] Parameter tags must be defined first in a doc comment 305 | WARNING | [x] '@todo: security?' should match the format '@todo Fix problem X here.' --------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------- FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/eva/eva_plugin_display_entity.inc ------------------------------------------------------------------------------------------------------------------ FOUND 14 ERRORS AFFECTING 8 LINES ------------------------------------------------------------------------------------------------------------------ 11 | ERROR | [ ] Class name must begin with a capital letter 11 | ERROR | [ ] Class name must use UpperCamel naming without underscores 16 | ERROR | [x] Visibility must be declared on method "option_definition" 16 | ERROR | [ ] Method name "eva_plugin_display_entity::option_definition" is not in lowerCamel format 33 | ERROR | [x] Visibility must be declared on method "options_summary" 33 | ERROR | [ ] Method name "eva_plugin_display_entity::options_summary" is not in lowerCamel format 102 | ERROR | [x] Visibility must be declared on method "options_form" 102 | ERROR | [ ] Method name "eva_plugin_display_entity::options_form" is not in lowerCamel format 224 | ERROR | [x] Visibility must be declared on method "options_submit" 224 | ERROR | [ ] Method name "eva_plugin_display_entity::options_submit" is not in lowerCamel format 280 | ERROR | [x] Visibility must be declared on method "validate" 293 | ERROR | [x] Visibility must be declared on method "get_path" 293 | ERROR | [ ] Method name "eva_plugin_display_entity::get_path" is not in lowerCamel format 310 | ERROR | [x] Visibility must be declared on method "execute" ------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------ FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/eva/eva-display-entity-view.tpl.php -------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line 24 | ERROR | [x] Doc comment long description must end with a full stop -------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml eva/
I'm moving this to โNeeds workโ for now.
Thank you!
- Status changed to Needs review
4 months ago 8:36pm 19 July 2024 - ๐บ๐ธUnited States DamienMcKenna NH, USA
A lot of things have changed in PHP over the years since I created #5, and some of the suggested changes might break compatibility with older releases of PHP.
Putting it back to "needs review" because of the above.