Steps to reproduce
Run following command
phpcs --standard=“Drupal,DrupalPractice” --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml .
Problem/Motivation
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/commerce_webform_order/README.md
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 142 characters
8 | WARNING | Line exceeds 80 characters; contains 172 characters
10 | WARNING | Line exceeds 80 characters; contains 137 characters
15 | WARNING | Line exceeds 80 characters; contains 89 characters
---------------------------------------------------------------------------------------
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/commerce_webform_order/commerce_webform_order.install
------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
54 | ERROR | [x] Expected 1 space after CATCH keyword; 0 found
54 | ERROR | [x] Newline required after opening brace
54 | ERROR | [x] Closing brace must be on a line by itself
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/commerce_webform_order/src/Plugin/WebformHandler/CommerceWebformOrderHandler.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------
412 | WARNING | [x] '@TODO: Use AJAX to reload order item bundle fields on product variation change.' should match the format '@todo Fix problem X here.'
436 | ERROR | [x] Use null coalesce operator instead of ternary operator.
441 | WARNING | [x] '@TODO: Use the same type of this order item field.' should match the format '@todo Fix problem X here.'
786 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
-----------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/commerce_webform_order/src/Element/EntityAutocompleteOrToken.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
185 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------
Comments
Comment #2
noorulshameera commentedAdding patch with issues fixed.
Comment #3
atul_ghate commentedI will review this patch.
Comment #4
atul_ghate commentedI've applied the patch cleanly and it resolved all the phpcs issues, moving to RTBC
Comment #7
charchil khandelwal commentedCreated MR !2 for this issue.
Please review.
Thank you.
Comment #8
avpadernoThe issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
Comment #9
imustakim commentedIssue summary updated.
Comment #10
avpadernoThe such price or currency). part must be indented respect the previous line.
Comment #12
facine commentedFixed, thanks!