There are some coding standard issues in this 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 created a patch for solving coding standard issues for this module. Please check and apply it.

Deepthi kumari’s picture

Status: Active » Needs review
StatusFileSize
new8.81 KB

Patch looks good. Found below issues.

FILE: E:\Xampp\htdocs\drupal-8.8.1\modules\contrib\email_token\email_token.tokens.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"
46 | WARNING | [ ] Unused variable $token_service.
50 | WARNING | [ ] Unused variable $langcode.
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: E:\Xampp\htdocs\drupal-8.8.1\modules\contrib\email_token\src\Plugin\Filter\EmailToken.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
27 | WARNING | [ ] Variable $options is undefined.
28 | WARNING | [ ] Variable $options is undefined.
38 | 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
---------------------------------------------------------------------------------------------------------------------------------------------

Fixed the t() call issue and left the unused variables for future use.

Updated the patch. Please review.

shashwat purav’s picture

Hello @Deepthi kumari, please provide interdiff file as well.

akshay kashyap’s picture

@Deepthi kumari

Thanks for the Patch but i am not able to apply the patch successfully get some error message during applying the patch please check.

git apply -v email_token_coding_standard-2895308-3.patch
Checking patch README.md...
Checking patch email_token.info.yml...
error: while searching for:

type: module
core: 8.x
version: '8.x-1.0'

error: patch failed: email_token.info.yml:4
error: email_token.info.yml: patch does not apply
Checking patch email_token.module...
Checking patch email_token.tokens.inc...
Checking patch src/Plugin/Filter/EmailToken.php...

shiv_sharma’s picture

StatusFileSize
new7.64 KB
new36.14 KB

Created a new patch with latest code. no new warning from phpcs

akshay kashyap’s picture

I have created MR to fix the drupal coding standard issue Please review.

Thank you.

shiv_sharma’s picture

Assigned: jayesh_makwana » Unassigned
nishant’s picture

Status: Needs review » Reviewed & tested by the community

Verified patch#7 working fine for me.

  • 69f114fd committed on 8.x-1.x
    fixed the issue reported in #2895308
    
rajan kumar’s picture

Status: Reviewed & tested by the community » Fixed

thank you everyone for provide patch OR test that patch.

I have committed #7 patch in latest version of module.

rajan kumar’s picture

Status: Fixed » Closed (fixed)