Fix issues reported by PHPCS

Created on 19 March 2025, 20 days ago

Running PHPCS shows the warnings/errors in attached file, which should be fixed.

📌 Task
Status

Active

Version

5.0

Component

Code

Created by

🇮🇳India GGH

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

Merge Requests

Comments & Activities

  • Issue created by @GGH
  • 🇮🇳India GGH

    MR Raised

  • Pipeline finished with Success
    19 days ago
    Total: 286s
    #451908
  • 🇮🇳India Bhupesh_upadhyay

    It looks like there are few issues that needs to be fixed.

    FILE: /var/www/html/drupal10_contro/web/modules/contrib/chosen/src/ChosenFormRender.php
    ---------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------
    38 | ERROR | Type hint "array" missing for $element
    125 | ERROR | Type hint "array" missing for $element
    143 | ERROR | Type hint "array" missing for $element
    ---------------------------------------------------------------------------------------

    FILE: /var/www/html/drupal10_contro/web/modules/contrib/chosen/modules/chosen_field/src/Plugin/Field/FieldWidget/ChosenFieldWidget.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
    25 | ERROR | [x] Missing class doc comment
    --------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------

    FILE: /var/www/html/drupal10_contro/web/modules/contrib/chosen/modules/chosen_field/tests/src/Functional/ChosenFieldWidgetsTest.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------------------------------------------
    40 | ERROR | Class property $card_1 should use lowerCamel naming without underscores
    47 | ERROR | Class property $card_2 should use lowerCamel naming without underscores
    94 | ERROR | The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
    --------------------------------------------------------------------------------------------------------------------------------------

    FILE: /var/www/html/drupal10_contro/web/modules/contrib/chosen/modules/chosen_lib/src/Commands/ChosenLibCommands.php
    --------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------
    151 | ERROR | The array declaration extends to column 91 (the limit is 80). The array content should be split up over multiple lines
    --------------------------------------------------------------------------------------------------------------------------------------

    FILE: /var/www/html/drupal10_contro/web/modules/contrib/chosen/chosen.module
    -------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    -------------------------------------------------------------------------------------
    19 | WARNING | Global constants should not be used, move it to a class or interface
    20 | WARNING | Global constants should not be used, move it to a class or interface
    21 | WARNING | Global constants should not be used, move it to a class or interface
    22 | WARNING | Global constants should not be used, move it to a class or interface
    -------------------------------------------------------------------------------------

Production build 0.71.5 2024