Fix the issues reported by phpcs

Created on 5 May 2023, over 1 year ago
Updated 19 June 2024, 5 months ago

GitLab CI reports PHP_CodeSniffer warnings/errors. The ones to still fix are the following ones.

FILE: ...8347/web/modules/custom/status_dashboard-3358347/src/Form/SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 33 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 242ms; Memory: 6MB

 
 

๐Ÿ“Œ 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

Merge Requests

Comments & Activities

  • Issue created by @paraderojether
  • Merge request !6Fix the issue reported by phpcs. โ†’ (Merged) created by paraderojether
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Created an MR to fix the issues reported by phpcs.

    Please review.
    Thank You.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Anmol_Specbee

    The patch is resolving all the above-mentioned issues. Moving to RTBC.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    This was clearly not tested, nor reviewed. Removing issue credits as well. Also make sure to use the correct branch.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    Branch was actually correct, sorry for that ๐Ÿ™ƒ

  • Assigned to RohitRawat676
  • Status changed to Active over 1 year ago
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom schillerm

    Hi, I patched (#8) the 2.0.x-dev version of this module (on a D9 site) and ran the following phpcs command on it..

    phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/status_dashboard

    I got the following output back..

    FILE: /home/user/Documents/Sites/D9/web/modules/contrib/status_dashboard/status_dashboard.module
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     47 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "_dashboard_email_reminder_notification_cron" but expected
        |       | "status_dashboard__dashboard_email_reminder_notification_cron"
     82 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "_dashboard_module_send_notification_mail" but expected
        |       | "status_dashboard__dashboard_module_send_notification_mail"
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/user/Documents/Sites/D9/web/modules/contrib/status_dashboard/status_dashboard.install
    -------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------
     144 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/user/Documents/Sites/D9/web/modules/contrib/status_dashboard/src/ClientSiteInterface.php
    ----------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------
     61 | ERROR | Missing parameter type
    ----------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/user/Documents/Sites/D9/web/modules/contrib/status_dashboard/README.md
    ----------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------
     61 | WARNING | Line exceeds 80 characters; contains 83 characters
     67 | WARNING | Line exceeds 80 characters; contains 92 characters
    ----------------------------------------------------------------------------------------
    
    
    FILE: /home/user/Documents/Sites/D9/web/modules/contrib/status_dashboard/PATCHES.txt
    ------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------
     1 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
     5 | ERROR   | [x] Expected 1 newline at end of file; 3 found
    ------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------
    
    Time: 156ms; Memory: 10MB
  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The last patch changes just two files, while the report shows errors/warnings for eight files.
    Also, since there is already a MR, it should be better to keep using that MR, instead of submitting patches or creating new MRs.

  • First commit to issue fork.
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom schillerm

    Hi again, back to review the latest version of MR!6.

    I ran ..

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/status_dashboard

    and got nothing back.

    +1 for RTBTC from me.

  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    None of the remarks on the merge request are solved. This MR will break the module...

    Removing credits once again.

  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    For the mixed datatype i'm not sure what type status_errors variable is. Please review the MR.

  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Status changed to Needs review 10 months ago
  • Status changed to Needs work 10 months ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    There are still private functions being made public.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs review 10 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    I think I corrected what needed to be corrected.

  • Status changed to Needs work 6 months ago
  • Hi @apaderno,

    Applied latest MR !16 version successfully, however it resulted to some issues.

    status_dashboard git:(2.0.x) curl https://git.drupalcode.org/project/status_dashboard/-/merge_requests/6.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  8558    0  8558    0     0  12264      0 --:--:-- --:--:-- --:--:-- 12367
    patching file README.md
    patching file src/ClientSiteInterface.php
    patching file src/Collector.php
    patching file src/Entity/ClientSite.php
    patching file src/Form/DashboardForm.php
    patching file status_dashboard.install
    patching file status_dashboard.module
    โžœ  status_dashboard git:(2.0.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig status_dashboard
    
    FILE: ...al-orgissue/web/modules/contrib/status_dashboard/src/Form/SettingsForm.php
    --------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     31 | ERROR | [x] The first parameter of a multi-line function declaration must
        |       |     be on the line after the opening bracket
     32 | ERROR | [x] Multi-line function declaration not indented correctly;
        |       |     expected 4 spaces but found 30
     32 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
     32 | ERROR | [x] The closing parenthesis of a multi-line function declaration
        |       |     must be on a new line
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 604ms; Memory: 12MB

    Kindly check

    Thanks,
    Jake

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    Hi, I have fixed mention issue from #22. Please review

  • Pipeline finished with Success
    6 months ago
    Total: 152s
    #185867
  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs review 6 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Pipeline finished with Success
    6 months ago
    Total: 139s
    #185920
  • Status changed to Fixed 6 months ago
  • ๐Ÿ‡ง๐Ÿ‡พBelarus farid.muborakshoev

    Added to new release, thank you.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    Fix issue credits.

  • Pipeline finished with Skipped
    6 months ago
    #191385
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium BramDriesen Belgium ๐Ÿ‡ง๐Ÿ‡ช

    Actually nothing was merged or pushed, and the new release is identical to the last one.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024