Fix the issues reported by phpcs

Created on 12 May 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

Problem/Motivation

Module's code contains several Drupal Coding Standards issues. This task is created to fix them.

Steps to reproduce

Run the command:

phpcs --standard=Drupal/web/modules/contrib/tsk/

Proposed resolution

Fix the following coding standards issues and upload the patch or create an MR with fixes.

FILE: \modules\contrib\tsk\assets\css\tsk-entity-form.css
-----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\assets\js\tsk-entity-form.js
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Commands\TskCommands.php
---------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
13 | ERROR | [ ] Missing short description in doc comment
45 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
46 | ERROR | [x] Parameter comment must end with a full stop
51 | ERROR | [x] Separate the @param and @usage sections by a blank line.
---------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Controller\TskController.php
-------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
15 | ERROR | [ ] Missing short description in doc comment
-------------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Entity\TskEntity.php
------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
77 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Entity\TskEntityInterface.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Form\TskEntityDeleteForm.php
-------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
47 | ERROR | [x] Expected newline after closing brace
52 | ERROR | [x] Expected 1 blank line after function; 0 found
53 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Form\TskEntityForm.php
--------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
100 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
150 | ERROR | [x] Expected newline after closing brace
--------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\Services\TskService.php
--------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
81 | ERROR | [x] Expected newline after closing brace
--------------------------------------------------------------------------------------

FILE: \modules\contrib\tsk\src\TskEntityListBuilder.php
---------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
97 | ERROR | [x] Short array syntax must be used to define arrays
---------------------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Shanu Chouhan

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.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024