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.
Comments
Comment #3
binoli lalani commentedHello,
I've created MR. Please review.
Thank you!
Comment #4
avpadernoComment #5
avpadernoWhat follows @todo must be a sentence, but not an interrogative sentence.
Please is not necessary. The sentence should use the imperative mood.
It is probably better to leave the code as it is.
Also, those are permissions, not users. The variable has the wrong name.
Comment #6
binoli lalani commentedHello @apaderno,
Thank you for reviewing the MR. I have updated the code as requested. Please review.
Thank you!
Comment #7
davps commentedComment #10
pray_12 commentedComment #12
davps commentedThanks everyone for help.