$ phpcs --standard=DrupalPractice .

FILE: /var/www/html/drupal8/web/modules/contrib/forgot_username/src/Form/ForgotUsernameForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
 19 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 23 | 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
 52 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 53 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 56 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 64 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 64 | WARNING | Unused variable $language.
 65 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 70 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------------------------------------------------

Comments

AohRveTPV created an issue. See original summary.

  • Kartagis committed 3ba7e4c on 8.x-1.x
    Issue #3082165: Eliminate phpcs warnings
    
kartagis’s picture

Status: Active » Fixed

Fixed and committed to 8.x. Thanks.

Status: Fixed » Closed (fixed)

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