Fix the issues reported by PHPCS

Created on 13 April 2023, about 2 years ago
Updated 3 January 2024, over 1 year ago

Problem/Motivation

FILE: .../web/modules/contrib/diff_moderate/src/Plugin/views/field/DiffModerate.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
21 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
31 | WARNING | [ ] Unused variable $rev_key.
33 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
43 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...es/contrib/diff_moderate/src/Controller/NodeModerateRevisionController.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
40 | WARNING | Line exceeds 80 characters; contains 92 characters
--------------------------------------------------------------------------------

Time: 293ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig diff_moderate/

Proposed resolution

Resolve all the issues for Drupal and DrupalPractice coding standards

Remaining tasks

Patch review.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

  • Issue created by @urvashi_vora
  • First commit to issue fork.
  • @rassoni opened merge request.
  • 🇮🇳India rassoni Bangalore

    Review patch and tested locally. Mention all phpcs issues are resolved. RTBC +

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi Rassoni,

    I also reviewed MR!1, applied against Moderate diff 1.0.x-dev with Drupal core version 10.1.7, and confirmed it fixes the issue reported by phpcs.

    I added screenshots for reference.
    Thank you.

Production build 0.71.5 2024