FILE: /var/www/web/modules/contrib/sendgrid_integration/modules/sendgrid_integration_reports/src/Form/SendGridReportsSettingsForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  73 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  79 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  88 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  92 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  98 | 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
 116 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 143 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/modules/sendgrid_integration_reports/src/Controller/SendGridReportsController.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 12 WARNINGS AFFECTING 13 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
  93 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 117 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 119 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 121 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 123 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 129 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 133 | 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
 145 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 148 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 164 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 165 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 168 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/modules/sendgrid_integration_reports/src/Api.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
  97 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 109 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 159 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 160 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 218 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 290 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 341 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/sendgrid_integration.module
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 22 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 10
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/tests/sendgrid_integration.mail.test
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 24 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/tests/sendgrid_integration.mail_test.test
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
 24 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/tests/sendgrid_integration.test
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 7 WARNINGS AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
 18 | ERROR   | [ ] Class property $admin_user should use lowerCamel naming without underscores
 25 | ERROR   | [ ] Class property $web_user should use lowerCamel naming without underscores
 41 | ERROR   | [x] Visibility must be declared on method "setUp"
 59 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 66 | ERROR   | [ ] Method name "SendgridIntegrationTestCase::testSendGridIntegrationAPISetup" is not in lowerCamel format
 66 | ERROR   | [x] Visibility must be declared on method "testSendGridIntegrationAPISetup"
 71 | 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
 72 | 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
 78 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 78 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 79 | ERROR   | [x] Expected 1 blank line after function; 2 found
 82 | ERROR   | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/src/Form/SendGridSettingsForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
  15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
 109 | WARNING | [x] A comma should follow the last multiline array item. Found: 0
 116 | WARNING | [x] A comma should follow the last multiline array item. Found: 0
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/src/Form/SendGridTestForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 115 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/src/Plugin/Mail/SendGridMail.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 18 WARNINGS AFFECTING 31 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
  24 | WARNING | [x] Unused use statement
  42 | ERROR   | [x] Missing class doc comment
 141 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 144 | ERROR   | [x] Perl-style comments are not allowed; use "// Comment" instead
 147 | WARNING | [ ] Unused variable $sandbox_mode.
 201 | ERROR   | [x] Perl-style comments are not allowed; use "// Comment" instead
 250 | WARNING | [ ] Variable $data inside unset call is undefined.
 251 | ERROR   | [x] Perl-style comments are not allowed; use "// Comment" instead
 261 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 279 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 290 | WARNING | [ ] Line exceeds 80 characters; contains 111 characters
 291 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 314 | ERROR   | [x] Case breaking statements must be followed by a single blank line
 315 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 325 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
 360 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
 366 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 372 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
 387 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 406 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 408 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 413 | ERROR   | [x] Case breaking statements must be followed by a single blank line
 414 | WARNING | [x] There must be no blank line following an inline comment
 414 | WARNING | [ ] There must be no blank line following an inline comment
 414 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 418 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 455 | WARNING | [x] There must be no blank line following an inline comment
 455 | WARNING | [ ] There must be no blank line following an inline comment
 477 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 723 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
 724 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
 741 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 743 | ERROR   | [ ] Missing parameter comment
 743 | ERROR   | [x] Missing parameter type
 745 | ERROR   | [ ] Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/CHANGELOG.md
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 52 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/sendgrid_integration.api.php
----------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
 26 | ERROR | [ ] Type hint "array" missing for $unique_args
 26 | ERROR | [ ] Type hint "array" missing for $response
 35 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 40 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 41 | ERROR | [x] Parameter comment must end with a full stop
 46 | ERROR | [ ] Type hint "array" missing for $unique_args
 46 | ERROR | [ ] Type hint "array" missing for $message
 55 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
 63 | ERROR | [ ] Type hint "array" missing for $categories
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/sendgrid_integration.install
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
 5 | ERROR | [x] Doc comment short description must end with a full stop
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/sendgrid_integration/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 43 | WARNING | Line exceeds 80 characters; contains 81 characters
 68 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------

Time: 674ms; Memory: 16MB

Steps to reproduce

Run following command
phpcs --standard=“Drupal,DrupalPractice” --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .

CommentFileSizeAuthor
#4 sendgrid_integration-3334758.patch31.28 KBsergiu stici
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:

  • 8.x-2.x Comparecompare
  • 1 hidden branch
  • 3334758-fix-phpcs Comparechanges, plain diff MR !25

Comments

Sergiu Stici created an issue. See original summary.

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

dineshkumarbollu’s picture

Assigned: Unassigned » dineshkumarbollu
sergiu stici’s picture

Status: Active » Needs review
StatusFileSize
new31.28 KB

here is the patch, please review

avpaderno’s picture

Title: Fix phpcs » Fix the issues reported by phpcs
Assigned: dineshkumarbollu » Unassigned
Category: Bug report » Task
Priority: Normal » Minor
Status: Needs review » Needs work
Issue tags: +Coding standards, +Needs issue summary update

The 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.

Ashutosh Ahirwal made their first commit to this issue’s fork.

ashutosh ahirwal’s picture

Status: Needs work » Needs review

Created MR 25
Please review.

avpaderno’s picture

Status: Needs review » Needs work

The status is for the issue summary that still needs to be updated.

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
Issue summary: View changes

perignon’s picture

PR #25 was the wrong branch. I closed the PR.

avpaderno’s picture

bindu r made their first commit to this issue’s fork.

avpaderno’s picture

Issue tags: +Needs reroll

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

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