Fix the issues reported by phpcs

Created on 9 May 2023, over 1 year ago
Updated 22 February 2024, 9 months ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\css\multipage.css
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\README.md
--------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 177 characters
6 | WARNING | Line exceeds 80 characters; contains 114 characters
7 | WARNING | Line exceeds 80 characters; contains 112 characters
22 | WARNING | Line exceeds 80 characters; contains 214 characters
24 | WARNING | Line exceeds 80 characters; contains 152 characters
--------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\sector_multipage.module
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
28 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
29 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
55 | WARNING | [x] A comma should follow the last multiline array item. Found: )
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\src\Plugin\Block\MultipageActionsBlock.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 2 WARNINGS AFFECTING 14 LINES
-----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
28 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
29 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
30 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
31 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
32 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
33 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
34 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
35 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
36 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
37 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
38 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

FILE: ...\xampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\src\Plugin\Block\MultipagePaginationBlock.php
------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
26 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
27 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
28 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
29 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
30 | ERROR | [x] Array indentation error, expected 6 spaces but found 0
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...ampp\htdocs\backendassignment\web\modules\contrib\sector_multipage\src\SectorMultipagePaginationBlockInterface.php
------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [x] Missing interface doc comment
6 | ERROR | [x] Opening brace should be on the same line as the declaration
8 | ERROR | [ ] Missing short description in doc comment
13 | ERROR | [ ] Missing short description in doc comment
20 | ERROR | [ ] Missing short description in doc comment
27 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

Time: 725ms; Memory: 6MB

Steps to reproduce

Run the codesniffer command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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 @sidharth_soman
  • 🇮🇳India sidharth_soman Bangalore

    I will fix the issues as mentioned in the summary and create an MR.

  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    I've opened an MR which fixes all the issues except for those related to filling out/editing documentation since it should be ideally resolved by the maintainers.

    Please review

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

    Hi sidharth_soman

    I applied your MR !5 to my local and confirmed that the PHPCS errors were fixed except those related to filling out/editing documentation.

    Please look at my screenshots attached for your reference

    Thank you.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
           <div class="button-wrapper">
             <a class="btn btn-default action--multipage-print js-multipage-print-page" href="javascript:void(0);">Print this publication</a>
    -      </div>',
    +            </div>',

    The existing HTML markup is already correctly indented, contrary to the changed line.

    +/**
    + *
    + */
    +interface SectorMultipagePaginationBlockInterface {

    Either the documentation comment contains what it should contain, or the documentation comment is not even added.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India _pratik_ Banglore
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The report shows warnings/errors for six files, but the MR changes just four files. The MR is not complete.

  • Assigned to imustakim
  • 🇮🇳India imustakim Ahmedabad

    Working on this.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India imustakim Ahmedabad

    Patch updated.
    Please review.

  • Hi, reviewed the patch #11 applied cleanly and fixes all the reported phpcs errors. But still found a minor error after patch. Attaching the ss for reference.

Production build 0.71.5 2024