Fix code issues

Created on 22 February 2023, almost 2 years ago
Updated 23 January 2024, 11 months ago

Consider https://www.drupal.org/pift-ci-job/2600736
Fix reported code issues

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇹Italy p4trizio Como

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

Comments & Activities

  • Issue created by @p4trizio
  • First commit to issue fork.
  • 🇮🇳India annmarysruthy

    Please Elaborate on the issues and how to reproduce the issues.

  • Assigned to Adil_Siddiqui
  • 🇮🇳India Adil_Siddiqui

    On running phpcs based on drupal standard using the command:
    vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/search_api_monitor

    Below errors are encountered:

    ------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------
    6 | ERROR | [x] Expected 1 newline at end of file; 2 found
    ------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------

    FILE: /Users/adil.shiddiqui/drupal9/web/modules/contrib/search_api_monitor/src/Controller/MonitorController.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    ---------------------------------------------------------------------------------------------------------------
    8 | ERROR | [x] Missing class doc comment
    10 | ERROR | [x] Missing function doc comment
    11 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    17 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    27 | ERROR | [x] Expected 1 blank line after function; 0 found
    28 | ERROR | [x] The closing brace for the class must have an empty line before it
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------

  • 🇮🇳India Adil_Siddiqui

    Patch created to solve above phpcs issues

  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India rajneeshb New Delhi

    Reviewed #5 All reported issues fixed.

  • Patch #6 fixes issues reported by phpcs.

    Applied patch and ran these commands:
    phpcs --standard=DrupalPractice --extensions='php,module,inc,install,test,profile,theme,info,txt,md'
    phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,info,txt,md'

  • Status changed to RTBC 11 months ago
  • Patch #6 fixes issues reported by phpcs.

    Applied patch and ran these commands:
    phpcs --standard=DrupalPractice --extensions='php,module,inc,install,test,profile,theme,info,txt,md'
    phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,info,txt,md'

Production build 0.71.5 2024