Coding standards cleanup

Created on 23 April 2024, 2 months ago
Updated 8 May 2024, about 2 months ago

Between Coder and Drupal Check there are a lot of minor issues in the codebase.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @DamienMcKenna
  • Assigned to DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
  • Issue was unassigned.
  • Status changed to Needs review 2 months ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    3 pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    A starting point.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    4 fail
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Some additional items.

  • The last submitted patch, 4: entity_ui-n3442925-4.patch, failed testing. View results β†’
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • Assigned to DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Still working on this.

  • Status changed to Needs review 2 months ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    3 pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I ran all of the tests locally and fixed issues that were found.

    There are lots more small issues with method and function arguments missing their comments, but it's in the right direction.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    3 pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Even moar.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    3 pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    One more small fix.

    There are also some class attributes that don't use lowerCamel format that should be changed, but that would constitute an API change and you might not want to do it.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Here's what's left:

    FILE: /src/EntityHandler/BundleEntityCollection.php
    --------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------
     24 | ERROR | Missing @var tag in member variable comment
     29 | ERROR | Missing @var tag in member variable comment
     34 | ERROR | Missing @var tag in member variable comment
    --------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityHandler/FieldUIWithoutBundleEntityProxy.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------------
      27 | ERROR | Missing @var tag in member variable comment
      32 | ERROR | Missing @var tag in member variable comment
     134 | ERROR | Protected method name "FieldUIWithoutBundleEntityProxy::setUpRealHandlerFromFieldUIBaseRoute" is not in
         |       | lowerCamel format
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityHandler/PlainBundlesEntityUIAdmin.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     32 | ERROR | Missing @var tag in member variable comment
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityHandler/EntityTabListBuilder.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    -------------------------------------------------------------------------------------------------------------
      78 | ERROR | Class property $target_entity_type_id should use lowerCamel naming without underscores
      85 | ERROR | Class property $target_entity_canonical_path should use lowerCamel naming without underscores
     225 | ERROR | Return type missing for @return tag in function comment
     277 | ERROR | Return type missing for @return tag in function comment
    -------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityHandler/BasicFieldUI.php
    ----------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------
     20 | ERROR | Missing @var tag in member variable comment
    ----------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityUiPermissions.php
    ---------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------
     44 | ERROR | Description for the @return value is missing
     67 | ERROR | Description for the @return value is missing
    ---------------------------------------------------------------------------------------------
    
    
    FILE: /src/Form/EntityTabForm.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------
      68 | ERROR | Missing parameter name
     373 | ERROR | Missing parameter type
     395 | ERROR | Missing parameter type
     401 | ERROR | Protected method name "EntityTabForm::getTargetEntityTypeCanonicalURL" is not in lowerCamel format
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/EntityTabsLoader.php
    ------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------
     36 | ERROR | Return type missing for @return tag in function comment
    ------------------------------------------------------------------------------------------
    
    
    FILE: /src/Entity/EntityTab.php
    -------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    -------------------------------------------------------------------------------------------------
     108 | ERROR | Missing @var tag in member variable comment
     168 | ERROR | Public method name "EntityTab::getTargetEntityTypeID" is not in lowerCamel format
     219 | ERROR | Public method name "EntityTab::getPluginID" is not in lowerCamel format
    -------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Entity/EntityTabInterface.php
    ---------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------
     20 | ERROR | Public method name "EntityTabInterface::getTargetEntityTypeID" is not in lowerCamel format
     71 | ERROR | Public method name "EntityTabInterface::getPluginID" is not in lowerCamel format
    ---------------------------------------------------------------------------------------------------------
    
    
    FILE: ...ers/dmckenna/Sites/drupal/10.3/modules/contrib/entity_ui/src/Plugin/EntityTabContent/ActionsConfigurableAction.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------
     44 | ERROR | Parameter $entity_type_manager is not described in comment
     44 | ERROR | Parameter $bundle_info_service is not described in comment
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Plugin/EntityTabContent/EntityView.php
    ------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------
     15 | ERROR | Missing short description in doc comment
     38 | ERROR | Parameter $bundle_info_service is not described in comment
    ------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Plugin/EntityTabContent/EntityForm.php
    ------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------
     16 | ERROR | Missing short description in doc comment
     39 | ERROR | Parameter $entity_type_manager is not described in comment
     39 | ERROR | Parameter $bundle_info_service is not described in comment
    ------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Plugin/EntityTabContent/OwnerAssign.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------
     19 | ERROR | Missing short description in doc comment
     35 | ERROR | Parameter $entity_type_manager is not described in comment
     35 | ERROR | Parameter $bundle_info_service is not described in comment
     35 | ERROR | Parameter $form_builder is not described in comment
    -------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Plugin/EntityTabContentFormBase.php
    ---------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------
     31 | ERROR | Parameter $bundle_info_service is not described in comment
    ---------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Plugin/EntityTabLazyPluginCollection.php
    --------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------
     18 | ERROR | Missing @var tag in member variable comment
    --------------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Controller/EntityTabController.php
    --------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     70 | ERROR | Return type missing for @return tag in function comment
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /src/Controller/EntityTabAddPage.php
    -----------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------
     56 | ERROR | Return type missing for @return tag in function comment
    -----------------------------------------------------------------------------------------------------
    
  • Issue was unassigned.
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 2 months ago
    3 pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    A few more fixes.

  • Status changed to Fixed 2 months ago
  • πŸ‡¬πŸ‡§United Kingdom joachim

    Urgh, all the indentation! That dates back from when I used TextMate as my text editor, and that's how it indented in a docblock and I CBA to keep adding a space every line!

    Committed, with a few changes -- some of the text changes read a bit wrong, e.g.

    -   * The ID of the entity type this handler is for.
    +   * The entity type this handler is for.
    

    Thanks!

    • joachim β†’ committed e5a20d00 on 8.x-1.x
      Issue #3442925 by DamienMcKenna: Fixed coding standards issues.
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Thanks for the quick turnaround on the commit, it'll make other patches & MRs easier to deal with.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024