Fix up coding standards

Created on 11 September 2023, 12 months ago
Updated 30 October 2023, 10 months ago

Problem/Motivation

there are a lot of JS and PHP coding standards issues

Steps to reproduce

see e.g. https://www.drupal.org/pift-ci-job/2760044

Proposed resolution

use automated tools to fix most/all

Remaining tasks

doit

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States pwolanin

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

Comments & Activities

  • Issue created by @pwolanin
  • Assigned to Shreya_98
  • 🇮🇳India Shreya_98

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\modules\config_terms_views\config_terms_views.info.yml
    -----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------
    7 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
    -----------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\modules\config_terms_views\src\Plugin\views\filter\ConfigTermsIndex.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
    45 | ERROR | Missing short description in doc comment
    50 | ERROR | Parameter $entity_repository is not described in comment
    63 | ERROR | Missing parameter name
    158 | ERROR | The array declaration extends to column 95 (the limit is 80). The array content should be split up over multiple lines
    276 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\src\Controller\ConfigTermsController.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------
    39 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
    52 | ERROR | The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
    -------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\src\Form\OverviewTerms.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
    229 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    383 | ERROR | The array declaration extends to column 104 (the limit is 80). The array content should be split up over multiple lines
    -----------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\src\Form\TermForm.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
    13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    -----------------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\src\Form\VocabForm.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
    12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    88 | ERROR | The array declaration extends to column 150 (the limit is 80). The array content should be split up over multiple lines
    96 | ERROR | The array declaration extends to column 146 (the limit is 80). The array content should be split up over multiple lines
    ----------------------------------------------------------------------------------------------------------------------------------------

    FILE: C:\Users\KIIT\Desktop\moduleslist\config_terms\tests\src\Functional\TermTest.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 10 ERRORS AFFECTING 10 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------
    58 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
    61 | ERROR | The array declaration extends to column 108 (the limit is 80). The array content should be split up over multiple lines
    80 | ERROR | The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
    81 | ERROR | The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple lines
    93 | ERROR | The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple lines
    94 | ERROR | The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines
    100 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
    101 | ERROR | The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
    107 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
    108 | ERROR | The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
    ---------------------------------------------------------------------------------------------------------------------------------------

    Time: 1.43 secs; Memory: 12MB

    This is the phpcs issues which we have to solve manually. I'm working on this.

  • Issue was unassigned.
  • Status changed to Needs review 12 months ago
  • 🇮🇳India Shreya_98

    @pwolanin I have Fixed all coding standards issues. Kindly Review the patch file and attached screenshot as well.

  • Status changed to RTBC 12 months ago
  • 🇮🇳India rushiraval

    I have tested Patch. Moving it to RTBC.

  • 🇺🇸United States pwolanin

    Thanks, looks like you fixed a lot

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    5 pass
  • Status changed to Fixed 12 months ago
    • pwolanin committed 5f779e6e on 8.x-1.x
      Issue #3386527 by Shreya_th, rushiraval: Fix up coding standards
      
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 10 months ago
  • 🇺🇸United States pwolanin

    Unfortunately the arguments to create() vs __construct() were no longer in the same order after this change. IDK why the test coverage didn't generate a fail.

Production build 0.71.5 2024