Unused variables in install file

Created on 7 March 2024, 10 months ago
Updated 16 May 2024, 7 months ago

Referred source
when I run the command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
I found this

FILE: /var/www/html/web/modules/contrib/etherpad_api/etherpad_api.install
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------
23 | WARNING | Unused variable $value.
24 | WARNING | Unused variable $msg.
-------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Harpreet_singh_saluja

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Harpreet_singh_saluja
  • ๐Ÿ‡ธ๐Ÿ‡ฎSlovenia useernamee Ljubljana
  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands gidarai

    Removed unused variables

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Ashutosh Ahirwal โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !2Removed unused variable. โ†’ (Open) created by Ashutosh Ahirwal
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Ashutosh Ahirwal India

    Hi, I have reviewed the #3 and also providing MR with fixes.
    Please review it.

  • Hi,

    I applied the patch and the MR, it fixed the reported issue however is also resulted to these issues that are reported by phpcs.

    FILE: ...site/drupal-orgissue/web/modules/contrib/etherpad_api/etherpad_api.install
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
    --------------------------------------------------------------------------------
      1 | ERROR   | [x] Missing file doc comment
     16 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
        |         |     question marks, colons, or closing parentheses
     22 | ERROR   | [x] Expected newline after closing brace
     27 | WARNING | [x] A comma should follow the last multiline array item. Found:
        |         |     )
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 230ms; Memory: 10MB

    Thank you.

  • Hi,

    I applied the patch and the MR, it fixed the reported issue however is also resulted to these issues that are reported by phpcs.

    FILE: ...site/drupal-orgissue/web/modules/contrib/etherpad_api/etherpad_api.install
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
    --------------------------------------------------------------------------------
      1 | ERROR   | [x] Missing file doc comment
     16 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
        |         |     question marks, colons, or closing parentheses
     22 | ERROR   | [x] Expected newline after closing brace
     27 | WARNING | [x] A comma should follow the last multiline array item. Found:
        |         |     )
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 230ms; Memory: 10MB

    Kindly review.
    Thank you.

  • Hi,

    Reviewed this yesterday and noticed remaining coding standards issue can be fixed immediately, so I created a patch.

    Kindly review.
    Thank you.

Production build 0.71.5 2024