Fix the issues reported by phpcs

Created on 31 May 2023, over 1 year ago
Updated 18 October 2023, about 1 year ago

Problem/Motivation

Found this issues reported by phpcs:

FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/login_history/login_history.module
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------
  8 | WARNING | [x] Unused use statement
 88 | WARNING | [ ] Unused variable $query.
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/login_history/src/Form/AdminSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 39 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Time: 418ms; Memory: 10MB

Steps to reproduce

Rund this command in the module folder: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml

Proposed resolution

Remaining tasks

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇵🇭Philippines paraderojether

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024