Fix the issues reported by phpcs

Created on 4 July 2023, 12 months ago

Problem/Motivation

Finding a lot of coding standard issues using phpcs (especially in the css file).
Here are some of them (excluding the css file since the list is way too large):

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\assets\vendor\tarteaucitron.js\README.md
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 15 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------------
  10 | WARNING | Line exceeds 80 characters; contains 177 characters
  12 | WARNING | Line exceeds 80 characters; contains 152 characters
  22 | WARNING | Line exceeds 80 characters; contains 117 characters
  34 | WARNING | Line exceeds 80 characters; contains 89 characters
  39 | WARNING | Line exceeds 80 characters; contains 82 characters
  49 | WARNING | Line exceeds 80 characters; contains 115 characters
  61 | WARNING | Line exceeds 80 characters; contains 86 characters
  62 | WARNING | Line exceeds 80 characters; contains 93 characters
  64 | WARNING | Line exceeds 80 characters; contains 91 characters
  66 | WARNING | Line exceeds 80 characters; contains 91 characters
 107 | WARNING | Line exceeds 80 characters; contains 102 characters
 115 | WARNING | Line exceeds 80 characters; contains 191 characters
 126 | WARNING | Line exceeds 80 characters; contains 167 characters
 140 | WARNING | Line exceeds 80 characters; contains 101 characters
 146 | WARNING | Line exceeds 80 characters; contains 120 characters
----------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\README.md
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------
  9 | WARNING | Line exceeds 80 characters; contains 124 characters
 11 | WARNING | Line exceeds 80 characters; contains 127 characters
---------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\src\Form\Steps\AddServices.php
--------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  83 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
  83 | ERROR   | [ ] Description for the @return value is missing
  92 | ERROR   | [ ] Missing parameter comment
  93 | ERROR   | [ ] Missing parameter comment
  95 | ERROR   | [ ] If there is no return value for a function, there must not be a @return tag.
  95 | ERROR   | [ ] Description for the @return value is missing
 208 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\src\Form\Steps\EditTexts.php
------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------
   1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
  32 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
  32 | ERROR | [ ] Description for the @return value is missing
  41 | ERROR | [ ] Missing parameter comment
  42 | ERROR | [ ] Missing parameter comment
  44 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
  44 | ERROR | [ ] Description for the @return value is missing
 427 | ERROR | [ ] Description for the @return value is missing
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\src\Form\Steps\ManageDialog.php
-------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 32 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
 32 | ERROR | [ ] Description for the @return value is missing
 41 | ERROR | [ ] Missing parameter comment
 42 | ERROR | [ ] Missing parameter comment
 44 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
 44 | ERROR | [ ] Description for the @return value is missing
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\tacjs.api.php
----------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\tacjs.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
 25 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\tacjs\tacjs_log\src\Controller\LogController.php
------------------------------------------------------------------------------------------------------------
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\tacjs\tacjs_log\tacjs_log.install
---------------------------------------------------------------------------------------------
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\tacjs\tacjs_log\tacjs_log.module
--------------------------------------------------------------------------------------------
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\tacjs\tacjs_media\src\Plugin\Field\FieldFormatter\TacJSOEmbedFormatter.php
--------------------------------------------------------------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------------------------------------------------------------

Time: 4.71 secs; Memory: 10MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

6.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
  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 12 months ago
  • 🇮🇳India sidharth_soman Bangalore

    I have fixed all the issues except for those related to filling out/editing documentation and comments.
    Please review the MR above.

Production build 0.69.0 2024