- šµšPhilippines cleavinjosh
Hi @lalitkyttn,
I applied patch #9, it was applied smoothly and fixed most of the phpcs issues.
These are the remaining issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
.ā commerce_sage git:(8.x-1.x) curl https://www.drupal.org/files/issues/2022-10-27/fix_coding_standard-3123361-9.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 51853 100 51853 0 0 173k 0 --:--:-- --:--:-- --:--:-- 174k patching file commerce_sage.routing.yml patching file src/Controller/CommerceSage.php patching file src/Plugin/Commerce/PaymentGateway/Onsite.php patching file src/PluginForm/Onsite/PaymentMethodAddForm.php ā commerce_sage git:(8.x-1.x) ā .. ā contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml commerce_sage FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/commerce_sage/src/PluginForm/Onsite/PaymentMethodAddForm.php --------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------- 8 | ERROR | Doc comment is empty --------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/commerce_sage/src/Plugin/Commerce/PaymentGateway/Onsite.php ---------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 86 ERRORS AND 7 WARNINGS AFFECTING 81 LINES ---------------------------------------------------------------------------------------------------------------------------------------------------- 14 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\commerce_payment\Exception\HardDeclineException. 40 | ERROR | [ ] Missing member variable doc comment 45 | WARNING | [ ] Possible useless method overriding detected 150 | ERROR | [ ] Missing parameter comment 150 | ERROR | [ ] Missing parameter type 151 | ERROR | [ ] Missing parameter comment 151 | ERROR | [ ] Missing parameter type 153 | ERROR | [ ] Description for the @return value is missing 197 | ERROR | [ ] Missing parameter comment 199 | ERROR | [ ] Description for the @return value is missing 216 | ERROR | [ ] Missing parameter comment 216 | ERROR | [ ] Missing parameter type 218 | ERROR | [ ] Description for the @return value is missing 243 | ERROR | [ ] Doc comment short description must start with a capital letter 244 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters 244 | ERROR | [ ] Doc comment short description must end with a full stop 244 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 253 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters 313 | ERROR | [ ] Missing parameter comment 313 | ERROR | [ ] Missing parameter type 314 | ERROR | [ ] Missing parameter comment 314 | ERROR | [ ] Missing parameter type 315 | ERROR | [ ] Missing parameter comment 334 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters 357 | ERROR | [ ] String concat is not required here; use a single string instead 358 | ERROR | [ ] String concat is not required here; use a single string instead 359 | ERROR | [ ] String concat is not required here; use a single string instead 360 | ERROR | [ ] String concat is not required here; use a single string instead 363 | ERROR | [ ] String concat is not required here; use a single string instead 364 | ERROR | [ ] String concat is not required here; use a single string instead 365 | ERROR | [ ] String concat is not required here; use a single string instead 366 | ERROR | [ ] String concat is not required here; use a single string instead 367 | ERROR | [ ] String concat is not required here; use a single string instead 368 | ERROR | [ ] String concat is not required here; use a single string instead 370 | ERROR | [ ] String concat is not required here; use a single string instead 371 | ERROR | [ ] String concat is not required here; use a single string instead 374 | ERROR | [ ] String concat is not required here; use a single string instead 377 | ERROR | [ ] String concat is not required here; use a single string instead 379 | ERROR | [ ] String concat is not required here; use a single string instead 380 | ERROR | [ ] String concat is not required here; use a single string instead 381 | ERROR | [ ] String concat is not required here; use a single string instead 382 | ERROR | [ ] String concat is not required here; use a single string instead 383 | ERROR | [ ] String concat is not required here; use a single string instead 384 | ERROR | [ ] String concat is not required here; use a single string instead 385 | ERROR | [ ] String concat is not required here; use a single string instead 386 | ERROR | [ ] String concat is not required here; use a single string instead 387 | ERROR | [ ] String concat is not required here; use a single string instead 391 | ERROR | [ ] String concat is not required here; use a single string instead 392 | ERROR | [ ] String concat is not required here; use a single string instead 395 | ERROR | [ ] String concat is not required here; use a single string instead 396 | ERROR | [ ] String concat is not required here; use a single string instead 397 | ERROR | [ ] String concat is not required here; use a single string instead 414 | WARNING | [ ] Unused variable $header. 486 | ERROR | [ ] Missing parameter comment 486 | ERROR | [ ] Missing parameter type 487 | ERROR | [ ] Missing parameter comment 487 | ERROR | [ ] Missing parameter type 488 | ERROR | [ ] Missing parameter comment 488 | ERROR | [ ] Missing parameter type 509 | ERROR | [ ] String concat is not required here; use a single string instead 510 | ERROR | [ ] String concat is not required here; use a single string instead 511 | ERROR | [ ] String concat is not required here; use a single string instead 512 | ERROR | [ ] String concat is not required here; use a single string instead 513 | ERROR | [ ] String concat is not required here; use a single string instead 514 | ERROR | [ ] String concat is not required here; use a single string instead 516 | ERROR | [ ] String concat is not required here; use a single string instead 517 | ERROR | [ ] String concat is not required here; use a single string instead 518 | ERROR | [ ] String concat is not required here; use a single string instead 519 | ERROR | [ ] String concat is not required here; use a single string instead 520 | ERROR | [ ] String concat is not required here; use a single string instead 576 | ERROR | [ ] Doc comment is empty 597 | ERROR | [ ] String concat is not required here; use a single string instead 598 | ERROR | [ ] String concat is not required here; use a single string instead 599 | ERROR | [ ] String concat is not required here; use a single string instead 600 | ERROR | [ ] String concat is not required here; use a single string instead 601 | ERROR | [ ] String concat is not required here; use a single string instead 602 | ERROR | [ ] String concat is not required here; use a single string instead 603 | ERROR | [ ] String concat is not required here; use a single string instead 677 | ERROR | [ ] The array declaration extends to column 142 (the limit is 120). The array content should be split up over multiple lines 720 | ERROR | [ ] Comment indentation error, expected only 1 spaces 721 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters 735 | ERROR | [ ] Description for the @return value is missing 773 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters 775 | ERROR | [ ] Missing parameter comment 775 | ERROR | [ ] Missing parameter type 776 | ERROR | [ ] Missing parameter comment 776 | ERROR | [ ] Missing parameter type 778 | ERROR | [ ] Description for the @return value is missing 788 | ERROR | [ ] String concat is not required here; use a single string instead 789 | ERROR | [ ] String concat is not required here; use a single string instead 791 | ERROR | [ ] String concat is not required here; use a single string instead 793 | ERROR | [ ] String concat is not required here; use a single string instead 794 | ERROR | [ ] String concat is not required here; use a single string instead ---------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/commerce_sage/src/Controller/CommerceSage.php --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 19 ERRORS AND 17 WARNINGS AFFECTING 32 LINES --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\commerce_order\Entity\Order. 11 | ERROR | [ ] Doc comment is empty 16 | ERROR | [ ] Doc comment is empty 19 | ERROR | [ ] Public method name "CommerceSage::Secure3DBack" is not in lowerCamel format 20 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 20 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request instead 27 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 28 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 28 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 31 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('cres') instead 35 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('threeDSSessionData') instead 38 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('cres') instead 49 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 60 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 61 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 64 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 65 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 66 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 70 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('PaRes') instead 71 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 72 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 72 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 79 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 82 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('PaRes') instead 90 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 90 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request instead 94 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 100 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 107 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request instead 108 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 109 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('MD') instead 112 | ERROR | [ ] The $_POST super global must not be accessed directly; inject the request_stack service and use $stack->getCurrentRequest()->request->get('threeDSSessionData') instead 143 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 145 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 149 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead 150 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 460ms; Memory: 16MB ā contrib
Thank you.
- š®š¹Italy apaderno Brescia, š®š¹
Let's create a merge request, now that patches are no longer tested.