Problem/Motivation

command -:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig web/modules/contrib/authorized_payment-3460171/

FILE: /var/www/html/d10/web/modules/contrib/authorized_payment/webform_authorize_net_payment.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 9 WARNINGS AFFECTING 14 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   3 | ERROR   | Missing short description in doc comment
  14 | ERROR   | Missing short description in doc comment
  23 | ERROR   | Doc comment short description must end with a full stop
  23 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
  69 | WARNING | #description values usually have to run through t() for translation
  79 | WARNING | #description values usually have to run through t() for translation
  89 | WARNING | #description values usually have to run through t() for translation
  99 | WARNING | #description values usually have to run through t() for translation
 109 | WARNING | #description values usually have to run through t() for translation
 120 | WARNING | #description values usually have to run through t() for translation
 136 | WARNING | Line exceeds 80 characters; contains 107 characters
 137 | WARNING | Line exceeds 80 characters; contains 107 characters
 137 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
 139 | ERROR   | Invalid function name, expected is_payment_field_enabled but found isPaymentFieldEnabled
 139 | ERROR   | All functions defined in a module file must be prefixed with the module's name, found "isPaymentFieldEnabled" but expected "webform_authorize_net_payment_isPaymentFieldEnabled"
 142 | WARNING | Line exceeds 80 characters; contains 83 characters
 172 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/authorized_payment/src/Controller/AuthorizeNetWebformPaymentController.php
----------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 5 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------------------------------------------------------
  18 | ERROR   | Doc comment is empty
  23 | ERROR   | Doc comment is empty
  30 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  35 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  36 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  38 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  43 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  51 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  57 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  64 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  73 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  81 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  88 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  89 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
  94 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 100 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 119 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 124 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 129 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 133 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 136 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 151 | ERROR   | Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
----------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/authorized_payment/src/Form/AuthorizationAuthenticationForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 31 | WARNING | Unused variable $config.
 35 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 39 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 39 | WARNING | \Drupal calls should be avoided in classes, use dependency injection 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
 47 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 47 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/authorized_payment/webform_authorize_net_payment.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/authorized_payment/README.txt
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------
 12 | WARNING | Line exceeds 80 characters; contains 108 characters
 15 | WARNING | Line exceeds 80 characters; contains 168 characters
 24 | WARNING | Line exceeds 80 characters; contains 97 characters
 33 | WARNING | Line exceeds 80 characters; contains 107 characters
 39 | WARNING | Line exceeds 80 characters; contains 86 characters
-------------------------------------------------------------------------

Time: 323ms; Memory: 12MB


Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

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

Hetal.Solanki created an issue. See original summary.

hetal.solanki’s picture

Assigned: Unassigned » hetal.solanki

hetal.solanki’s picture

Assigned: hetal.solanki » Unassigned
Status: Active » Needs review
bhaveshdas’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new26.13 KB

I have tested MR 1 and it is working properly with no errors found. I will move it forward to RTBC.

hetal.solanki’s picture

Issue summary: View changes
shaikh sadab’s picture

Status: Reviewed & tested by the community » Fixed

We have tested your Merge Request, and it's almost correct. However, when we go to the settings >> form page to enable the payment field, we encounter the following error.

Drupal\Component\Serialization\Exception\InvalidDataTypeException: Object support when dumping a YAML file has been disabled. in Drupal\Component\Serialization\Yaml::encode() (line 25 of C:\wamp64\www\drupal-contrib\core\lib\Drupal\Component\Serialization\Yaml.php).

We have fixed this issue in the latest release.

shaikh sadab’s picture

Status: Fixed » Closed (fixed)