Fix the issues reported by phpcs

Created on 3 July 2023, about 1 year ago
Updated 5 July 2023, about 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/forcedfiledeletion/forcedfiledeletion.module
--------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
38 | ERROR | [x] There must be exactly one blank line before the tags in a doc
| | comment
38 | ERROR | [ ] Missing parameter type
41 | ERROR | [ ] If there is no return value for a function, there must not be
| | a @return tag.
41 | ERROR | [ ] Description for the @return value is missing
45 | ERROR | [x] PHP keywords must be lowercase; expected "instanceof" but
| | found "instanceOf"
63 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/forcedfiledeletion/forcedfiledeletion.info.yml
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

Time: 103ms; Memory: 10MB

Steps to reproduce

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

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
  • Status changed to Needs work about 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi @urvashi_vora,

    I got an error when applying your Patch, please see the attached screenshot for reference.

    Moving this to Needs work.

    Thank you.

  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Anjali Mehta

    Created a patch to fix the issues reported by phpcs.

    Please review.
    Thank You.

  • Status changed to Needs work about 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi @anjali,

    I reviewed your changes and confirmed the Patch was applied cleanly.

    Checking patch forcedfiledeletion.info.yml...
    Checking patch forcedfiledeletion.module...
    Applied patch forcedfiledeletion.info.yml cleanly.
    Applied patch forcedfiledeletion.module cleanly.

    However, I'm still seeing PHPCS errors, please see the attached file "afterthepatch.png".

    Moving this to Needs work, kindly check, please.

    Thank you!

  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Soham Sengupta

    Hi,
    I have updated the patch file with the remaining fixes.

  • Status changed to RTBC about 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi @soham,

    I reviewed your latest changes and confirmed the Patch was applied cleanly.

    Checking patch forcedfiledeletion.info.yml...
    Checking patch forcedfiledeletion.module...
    Applied patch forcedfiledeletion.info.yml cleanly.
    Applied patch forcedfiledeletion.module cleanly.

    And all PHPCS errors have been fixed.

    I ran this command:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig forcedfiledeletion/

    Successfully applied to Forced File Deletion module with 1.0.x-dev version and with the Drupal core version of 9.5.x.

    Please see the attached file for your reference.

    I'm moving this now to RTBC.

    Thank you!

Production build 0.71.5 2024