Fix the issues reported by phpcs

Created on 27 March 2023, about 1 year ago
Updated 27 March 2024, 3 months ago

Problem/Motivation

FILE: /nodeorder/nodeorder.install
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 13 | WARNING | [x] '@todo: Handle exceptions that could be thrown by DatabaseSchema::addField.' should match the format '@todo Fix problem X
    |         |     here.'
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /nodeorder/src/NodeOrderManager.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
 201 | WARNING | [x] '@todo: distinct?' should match the format '@todo Fix problem X here.'
 203 | WARNING | [x] '@todo: ORDER BY ' . $order;' should match the format '@todo Fix problem X here.'
 220 | WARNING | [x] '@todo: Please convert this statement to the D7 database API syntax.' should match the format '@todo Fix problem X
     |         |     here.'
 224 | WARNING | [x] '@todo: Please convert this statement to the D7 database API syntax.' should match the format '@todo Fix problem X
     |         |     here.'
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /nodeorder/src/NodeOrderManagerInterface.php
-----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
 75 | ERROR | Type hint "array" missing for $tids
-----------------------------------------------------------------------------------------------

FILE: /nodeorder/tests/src/Functional/NodeorderPermissionsTest.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 97 | ERROR | The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /nodeorder/nodeorder.module
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 119 | WARNING | [x] '@todo: Replace this hacked function call.' should match the format '@todo Fix problem X here.'
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: /nodeorder/README.md
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------
 22 | WARNING | Line exceeds 80 characters; contains 82 characters
 23 | WARNING | Line exceeds 80 characters; contains 245 characters
 26 | WARNING | Line exceeds 80 characters; contains 158 characters
-----------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml nodeorder

Proposed resolution

Fix the warnings and errors.

๐Ÿ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Binoli Lalani Gujarat

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024