Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/workbench_reviewer/tests/src/Functional/WorkbenchReviewerFormTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/workbench_reviewer/README.md
-----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 282 characters
7 | WARNING | Line exceeds 80 characters; contains 142 characters
17 | WARNING | Line exceeds 80 characters; contains 104 characters
22 | WARNING | Line exceeds 80 characters; contains 165 characters
24 | WARNING | Line exceeds 80 characters; contains 143 characters
26 | WARNING | Line exceeds 80 characters; contains 194 characters
28 | WARNING | Line exceeds 80 characters; contains 247 characters
32 | WARNING | Line exceeds 80 characters; contains 159 characters
-----------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/workbench_reviewer/workbench_reviewer.module
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
96 | WARNING | [ ] Unused variable $node.
139 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run the following command : phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml /10.1.x/drupal/modules/contrib/workbench_reviewer

Proposed resolution

Fix the above errors.

Remaining tasks

User interface changes

API changes

Data model changes

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

sahil.goyal created an issue. See original summary.

sahil.goyal’s picture

StatusFileSize
new4.85 KB

Fixing the phpcs issues/erros

Charchil Khandelwal made their first commit to this issue’s fork.

charchil khandelwal’s picture

Assigned: Unassigned » charchil khandelwal

I will review this.

charchil khandelwal’s picture

Assigned: charchil khandelwal » Unassigned
Status: Needs work » Needs review

All warnings and errors are fixed now.
Created MR for same.
Please review.

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -
StatusFileSize
new261.57 KB
new68.1 KB

Hi Charchil Khandelwal

I reviewed MR!1, and confirmed it fixes the issue reported by the phpcs. Drupal core version 9.5.8, Workbench Reviewer 3.0.0-beta1.

I added screenshots for reference.
Thank You.

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Version: 3.0.0-beta1 » 3.0.x-dev
Category: Bug report » Task
Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work
Issue tags: +Coding standards
 function workbench_reviewer_entity_presave(EntityInterface $entity) {
   if ($entity->getEntityTypeId() === 'node') {
-    $node = $entity;
+    // $node = $entity;
   }
 }

If a line must be removed, it is not commented out.

himanshu_jhaloya’s picture

Assigned: Unassigned » himanshu_jhaloya
himanshu_jhaloya’s picture

StatusFileSize
new421 bytes

Created patch for the commented issue. please review

himanshu_jhaloya’s picture

Assigned: himanshu_jhaloya » Unassigned
Status: Needs work » Needs review

nitin_lama made their first commit to this issue’s fork.

nitin_lama’s picture

Updated the MR.

abhinesh’s picture

Assigned: Unassigned » abhinesh
Status: Needs review » Reviewed & tested by the community

Thank you for your contribution's! Merging it into the development branch now.

abhinesh’s picture

Status: Reviewed & tested by the community » Fixed
abhinesh’s picture

Status: Fixed » Closed (fixed)