Drupal Coding Standards Issues | phpcs

Created on 1 February 2023, over 1 year ago
Updated 13 May 2024, about 2 months ago

Problem/Motivation

Getting following error/warnings.

FILE: ...mpp\htdocs\abc\drupal\modules\odata_client\odata_client.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
1 | WARNING | "core_version_requirement" property is missing in the
| | info.yml file
----------------------------------------------------------------------

FILE: ...ocs\abc\drupal\modules\odata_client\src\Form\OdataServerForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
14 | ERROR | Missing member variable doc comment
----------------------------------------------------------------------

FILE: ...abc\drupal\modules\odata_client\src\Odata\InputOutputService.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
11 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
242 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
----------------------------------------------------------------------

FILE: ...l\modules\odata_client\src\Odata\InputOutputServiceInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
7 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------

FILE: ...\htdocs\abc\drupal\modules\odata_client\src\Odata\OdataQuery.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------

FILE: ...bc\drupal\modules\odata_client\src\Odata\OdataQueryInterface.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
7 | WARNING | The class short comment should describe what the class
| | does and not simply repeat the class name
----------------------------------------------------------------------

FILE: ...les\odata_client\src\Plugin\OdataAuthPlugin\OdataAuthGeneric.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
19 | WARNING | The class short comment should describe what the
| | class does and not simply repeat the class name
----------------------------------------------------------------------

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/odata_client/

Proposed resolution

Above error/warnings need to be fixed.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India Charchil Khandelwal

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

Comments & Activities

  • Issue created by @Charchil Khandelwal
  • @charchil-khandelwal opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India Charchil Khandelwal

    Created MR for this issue.
    Please review.

  • Assigned to gaurav-mathur
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • FILE: ...abc\drupal\modules\odata_client\src\Odata\InputOutputService.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
    242 | WARNING | \Drupal calls should be avoided in classes, use
    | | dependency injection instead
    ----------------------------------------------------------------------

    Need to fix this warning.

  • @_pratik_ opened merge request.
  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇭🇺Hungary pedrop

    The default and only active branch is 3.1.x.
    I recommend closing this.

Production build 0.69.0 2024