The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
(Drupal.Arrays.Array.LongLineDeclaration)

Closing parenthesis of array declaration must be on a new line
(Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine)

Unused use statement
(Drupal.Classes.UnusedUseStatement.UnusedUse)

Missing file doc comment (Drupal.Commenting.FileComment.Missing)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

omrmankar created an issue. See original summary.

omrmankar’s picture

Assigned: omrmankar » Unassigned
Status: Needs work » Needs review
FileSize
2.43 KB

Hi,

I have created a patch that is working according to the phpcs standards and resolves all errors.

The patch is attached.

darvanen’s picture

Status: Needs review » Needs work
  1. Item removed, sorry, I was wrong, that file doesn't have a namespace.
  2. +++ b/src/EmailChangeService.php
    @@ -2,17 +2,17 @@
    -use Drupal\Component\Utility\Crypt;
    -use Drupal\Core\Config\ConfigFactoryInterface;
    -use Drupal\Core\Language\LanguageManagerInterface;
    -use Drupal\Core\Mail\MailManagerInterface;
    -use Drupal\Core\Messenger\MessengerInterface;
    +use Drupal\Core\Url;
     use Drupal\Core\Render\Markup;
     use Drupal\Core\Site\Settings;
    -use Drupal\Core\Url;
     use Drupal\Core\Utility\Token;
     use Drupal\user\UserInterface;
    +use Drupal\Component\Utility\Crypt;
     use Drupal\Core\Database\Connection;
    +use Drupal\Core\Mail\MailManagerInterface;
    +use Drupal\Core\Messenger\MessengerInterface;
    +use Drupal\Core\Config\ConfigFactoryInterface;
    +use Drupal\Core\Language\LanguageManagerInterface;
    

    Unnecessary change.

omrmankar’s picture

@darvanen it just sorts the namespace doesn't affect in performance using code. you can commit these changes.

  • daften committed dcff336 on 1.x authored by omrmankar
    Issue #3229392 by omrmankar, darvanen, daften: Fix Drupal coding...
daften’s picture

Status: Needs work » Fixed

Fix incorporated and I've also fixed some direct t calls with $this->t in the ConfigForm class. The code now fully adheres to Drupal and DrupalPractice coding standards. Thanks omrmankar and darvanen!

Status: Fixed » Closed (fixed)

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