There are some coding standard issues in module.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jayesh_makwana created an issue. See original summary.

jayesh_makwana’s picture

We create a patch for solving coding standard issues for this module. Please check and apply it.

Anupam_Dhauria’s picture

Assigned: jayesh_makwana » Anupam_Dhauria
Status: Active » Needs review

Hi @Jayesh_makwana,
Thank you for patch . I will review this.

Anupam_Dhauria’s picture

Status: Needs review » Needs work

Hi @jayesh_makwana,
your patch is applied cleanly.

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib/commerce_adyen-2887229 (2887229-coding-standard-issues)
$ git apply -v commerce_adyen_coding_standard-2887229-2.patch
Checking patch README.md...
Checking patch adyen/Authorisation/Request.inc...
Checking patch adyen/Authorisation/Response.inc...
Checking patch adyen/Client.inc...
Checking patch adyen/Controller/Payment.inc...
Checking patch adyen/Modification.php...
Checking patch commerce_adyen.module...
Applied patch README.md cleanly.
Applied patch adyen/Authorisation/Request.inc cleanly.
Applied patch adyen/Authorisation/Response.inc cleanly.
Applied patch adyen/Client.inc cleanly.
Applied patch adyen/Controller/Payment.inc cleanly.
Applied patch adyen/Modification.php cleanly.
Applied patch commerce_adyen.module cleanly.

but still I am getting error.

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig commerce_adyen-2887229/

FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Authorisation\Request.inc
---------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
---------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  45 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
  52 | WARNING | [ ] Exceptions should not be translated
  94 | WARNING | [ ] Exceptions should not be translated
 446 | WARNING | [ ] Exceptions should not be translated
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Authorisation\Response.inc
----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  51 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
  62 | ERROR   | [x] list(...) is forbidden, use [...] instead.
  83 | WARNING | [ ] Exceptions should not be translated
  93 | WARNING | [ ] Exceptions should not be translated
 110 | ERROR   | [x] Expected "object" but found "\stdClass" for function return type
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Authorisation\Signature.inc
-----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 25 | ERROR | [x] Expected "object" but found "\stdClass" for parameter type
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Capture.inc
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
 1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 7 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Client.inc
------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Composition\Address.inc
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Composition\Shopper.inc
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Controller\Checkout.inc
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Controller\Controller.inc
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Controller\Payment.inc
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Exception\NotificationException.inc
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Facade.inc
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 26 | ERROR | [x] Expected "\EntityDrupalWrapper|object|string|int" but found "\EntityDrupalWrapper|\stdClass|string|int" for parameter type
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Modification.php
------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  40 | ERROR   | [x] Expected "object|int|string" but found "\stdClass|int|string" for parameter type
 119 | WARNING | [ ] Exceptions should not be translated
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Notification.inc
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
 1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Refund.inc
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
 1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 7 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\ShopperInteraction.inc
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Transaction\Payment.inc
-------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 26 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\r\n"
 51 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\r\n"
 70 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\r\n"
 88 | ERROR | [x] Language constructs must be followed by a single space; expected 1 space but found "\r\n"
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\adyen\Transaction\Refund.inc
------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\commerce_adyen.api.php
------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 1 WARNING AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  13 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
  30 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
  65 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
  71 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
  89 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 103 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 118 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 133 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 135 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 138 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
 138 | ERROR   | [x] Parameter comment must end with a full stop
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\commerce_adyen.commerce.inc
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\commerce_adyen.module
-----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 12 WARNINGS AFFECTING 16 LINES
-----------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  57 | WARNING | [ ] Open page callback found, please add a comment before the line why there is no access restriction
  72 | WARNING | [ ] Exceptions should not be translated
 102 | WARNING | [ ] Exceptions should not be translated
 106 | WARNING | [ ] Exceptions should not be translated
 110 | WARNING | [ ] Exceptions should not be translated
 116 | WARNING | [ ] Exceptions should not be translated
 141 | WARNING | [ ] Exceptions should not be translated
 147 | WARNING | [ ] Exceptions should not be translated
 170 | ERROR   | [x] Expected "object|int|string" but found "\stdClass|int|string" for parameter type
 184 | WARNING | [ ] Exceptions should not be translated
 250 | ERROR   | [x] Expected "object" but found "\stdClass" for parameter type
 260 | WARNING | [ ] Exceptions should not be translated
 278 | WARNING | [ ] Exceptions should not be translated
 282 | WARNING | [ ] Exceptions should not be translated
 347 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\commerce_adyen.rules.inc
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\includes\commerce_adyen.notification.inc
------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\includes\commerce_adyen.payment.inc
-------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  27 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 234 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 420 | WARNING | [ ] Exceptions should not be translated
 423 | WARNING | [ ] Exceptions should not be translated
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_boleto\adyen\CheckoutController.inc
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_boleto\adyen\PaymentController.inc
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_boleto\commerce_adyen_boleto.module
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_openinvoice\adyen\CheckoutController.inc
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_openinvoice\adyen\PaymentController.inc
----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 63 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
 85 | WARNING | [ ] Line exceeds 80 characters; contains 100 characters
----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_openinvoice\commerce_adyen_openinvoice.api.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\DRUPAL CONTRIB\drup8\web\modules\contrib\commerce_adyen-2887229\modules\commerce_adyen_openinvoice\commerce_adyen_openinvoice.module
----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 1.9 secs; Memory: 12MB

Moving to need work. I am working on it.

Anupam_Dhauria’s picture

Assigned: Anupam_Dhauria » Unassigned
Status: Needs work » Needs review
StatusFileSize
new24.88 KB

Hi,
I have worked on this issue.
Providing patch for review.

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig commerce_adyen-2887229/

win10@DESKTOP-VCMGGU5 MINGW64 /c/xampp/htdocs/DRUPAL CONTRIB/drup8/web/modules/contrib
$ phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig commerce_adyen-2887229/

No fixable errors were found

Time: 1.88 secs; Memory: 12MB
i-trokhanenko’s picture

Assigned: Unassigned » i-trokhanenko
rohit.rawat619’s picture

Assigned: i-trokhanenko » rohit.rawat619
Status: Needs review » Active
rohit.rawat619’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Assigned: rohit.rawat619 » Unassigned
Status: Active » Needs review
StatusFileSize
new3.17 KB

Fixing codeing standard

roberttabigue’s picture

Status: Needs review » Needs work

Hi @RohitRawat676,

Confirmed patch #8 is applied cleanly.

Applied to Commerce Adyen with 8.x-1.x-dev version and with the Drupal core version of 9.5.x.

Checking patch commerce_adyen.install...
Checking patch src/Adyen/Authorisation/Request.php...
Checking patch src/Adyen/Authorisation/Response.php...
Checking patch src/Adyen/Authorisation/Signature.php...
Checking patch src/Adyen/Facade.php...
Checking patch src/Adyen/Modification.php...
Applied patch commerce_adyen.install cleanly.
Applied patch src/Adyen/Authorisation/Request.php cleanly.
Applied patch src/Adyen/Authorisation/Response.php cleanly.
Applied patch src/Adyen/Authorisation/Signature.php cleanly.
Applied patch src/Adyen/Facade.php cleanly.
Applied patch src/Adyen/Modification.php cleanly.

However, I'm still getting PHPCS errors:

I ran this command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml commerce_adyen/

FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/commerce_adyen.routing.yml
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
  8 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 16 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
---------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/README.md
----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------
 39 | WARNING | Line exceeds 80 characters; contains 84 characters
 41 | WARNING | Line exceeds 80 characters; contains 87 characters
 49 | WARNING | Line exceeds 80 characters; contains 83 characters
 57 | WARNING | Line exceeds 80 characters; contains 135 characters
 63 | WARNING | Line exceeds 80 characters; contains 88 characters
----------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/PluginForm/BoletoPaymentForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 41 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 48 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 77 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/PluginForm/OpenInvoicePaymentForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  44 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  45 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  52 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  65 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  66 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  72 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 101 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 106 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Refund.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: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Modification.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 119 | WARNING | Exceptions should not be translated
 119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Authorisation/Response.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 85 | WARNING | Exceptions should not be translated
 85 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 95 | WARNING | Exceptions should not be translated
 95 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Authorisation/Request.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  52 | WARNING | Exceptions should not be translated
  52 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 125 | WARNING | Exceptions should not be translated
 125 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 477 | WARNING | Exceptions should not be translated
 477 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Controller/Payment.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------
 118 | WARNING | Unused variable $order.
 184 | WARNING | Unused variable $order.
---------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Capture.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: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Notification.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: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Plugin/Commerce/PaymentGateway/OpenInvoice.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
 126 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 127 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 130 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 131 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 132 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 138 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 140 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 142 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 143 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 144 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 151 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 152 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Plugin/Commerce/PaymentGateway/Boleto.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
------------------------------------------------------------------------------------------------------------------------------------------
 126 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 127 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 130 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 131 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 132 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 138 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 140 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 142 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 143 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 144 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 151 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 152 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

Moving this now to Needs work.

Thank you!

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Status: Needs work » Needs review
StatusFileSize
new16.92 KB
new13.42 KB

Addressed #9. Please review.

nitin_lama’s picture

Assigned: nitin_lama » Unassigned
roberttabigue’s picture

Status: Needs review » Needs work

Hi @nitin_lama,

I reviewed your changes and confirmed the Patch was applied cleanly.

Checking patch README.md...
Checking patch commerce_adyen.install...
Checking patch src/Adyen/Authorisation/Request.php...
Checking patch src/Adyen/Authorisation/Response.php...
Checking patch src/Adyen/Authorisation/Signature.php...
Checking patch src/Adyen/Capture.php...
Checking patch src/Adyen/Controller/Payment.php...
Checking patch src/Adyen/Facade.php...
Checking patch src/Adyen/Modification.php...
Checking patch src/Adyen/Refund.php...
Checking patch src/Plugin/Commerce/PaymentGateway/Boleto.php...
Checking patch src/Plugin/Commerce/PaymentGateway/OpenInvoice.php...
Checking patch src/PluginForm/BoletoPaymentForm.php...
Checking patch src/PluginForm/OpenInvoicePaymentForm.php...
Applied patch README.md cleanly.
Applied patch commerce_adyen.install cleanly.
Applied patch src/Adyen/Authorisation/Request.php cleanly.
Applied patch src/Adyen/Authorisation/Response.php cleanly.
Applied patch src/Adyen/Authorisation/Signature.php cleanly.
Applied patch src/Adyen/Capture.php cleanly.
Applied patch src/Adyen/Controller/Payment.php cleanly.
Applied patch src/Adyen/Facade.php cleanly.
Applied patch src/Adyen/Modification.php cleanly.
Applied patch src/Adyen/Refund.php cleanly.
Applied patch src/Plugin/Commerce/PaymentGateway/Boleto.php cleanly.
Applied patch src/Plugin/Commerce/PaymentGateway/OpenInvoice.php cleanly.
Applied patch src/PluginForm/BoletoPaymentForm.php cleanly.
Applied patch src/PluginForm/OpenInvoicePaymentForm.php cleanly.

However, I'm still seeing a couple of PHPCS errors:

FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/commerce_adyen.routing.yml
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
  8 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 16 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
---------------------------------------------------------------------------------------------------------------------


FILE: /Users/roberttabigue/Projects/drupalorgissues/docroot/modules/contrib/commerce_adyen/src/Adyen/Notification.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
---------------------------------------------------------------------------------------------------------------------

Time: 592ms; Memory: 12MB

Moving this again to Needs work.

Thank you!

Frederikvho made their first commit to this issue’s fork.

frederikvho’s picture

Status: Needs work » Needs review

Please check the newest merge request.
The other merge request's fork was branched from 7.x, this one is 8.x.

Merge request 8.x

Summary:
Applied the existing patch from #11
+
Added extra fixes for remaining phpcs warnings that were also addressed in #13

roberttabigue’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new180.46 KB
new73.49 KB

Hi,

I reviewed the new changes made by @Frederikvho and was applied cleanly.

Checking patch README.md...
Hunk #1 succeeded at 36 (offset -2 lines).
Hunk #2 succeeded at 48 (offset -2 lines).
Hunk #3 succeeded at 57 (offset -2 lines).
Checking patch commerce_adyen.install...
Checking patch commerce_adyen.routing.yml...
Checking patch src/Adyen/Authorisation/Request.php...
Checking patch src/Adyen/Authorisation/Response.php...
Checking patch src/Adyen/Authorisation/Signature.php...
Checking patch src/Adyen/Capture.php...
Checking patch src/Adyen/Controller/Payment.php...
Checking patch src/Adyen/Facade.php...
Checking patch src/Adyen/Modification.php...
Checking patch src/Adyen/Notification.php...
Checking patch src/Adyen/Refund.php...
Checking patch src/Plugin/Commerce/PaymentGateway/Boleto.php...
Checking patch src/Plugin/Commerce/PaymentGateway/OpenInvoice.php...
Checking patch src/PluginForm/BoletoPaymentForm.php...
Checking patch src/PluginForm/OpenInvoicePaymentForm.php...
Applied patch README.md cleanly.
Applied patch commerce_adyen.install cleanly.
Applied patch commerce_adyen.routing.yml cleanly.
Applied patch src/Adyen/Authorisation/Request.php cleanly.
Applied patch src/Adyen/Authorisation/Response.php cleanly.
Applied patch src/Adyen/Authorisation/Signature.php cleanly.
Applied patch src/Adyen/Capture.php cleanly.
Applied patch src/Adyen/Controller/Payment.php cleanly.
Applied patch src/Adyen/Facade.php cleanly.
Applied patch src/Adyen/Modification.php cleanly.
Applied patch src/Adyen/Notification.php cleanly.
Applied patch src/Adyen/Refund.php cleanly.
Applied patch src/Plugin/Commerce/PaymentGateway/Boleto.php cleanly.
Applied patch src/Plugin/Commerce/PaymentGateway/OpenInvoice.php cleanly.
Applied patch src/PluginForm/BoletoPaymentForm.php cleanly.
Applied patch src/PluginForm/OpenInvoicePaymentForm.php cleanly.

And all PHPCS errors have been fixed.

I ran this command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig

Please see the attached screenshots for your reference.

I'm moving this now to RTBC.

Thank you!

i-trokhanenko’s picture

Thanks!

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.