Fixing the coding standard issues | phpcs

Created on 3 April 2023, over 1 year ago
Updated 1 June 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_mailmerge_field-3351816\README.md
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------
13 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
16 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
34 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
49 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
57 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
81 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: ...backendassignment\web\modules\contrib\views_mailmerge_field-3351816\src\Plugin\views\field\ViewsMailMergeField.php
------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AFFECTING 17 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
18 | ERROR | [x] Whitespace found at end of line
22 | ERROR | [x] Whitespace found at end of line
28 | ERROR | [x] Whitespace found at end of line
30 | ERROR | [x] Whitespace found at end of line
32 | ERROR | [x] Whitespace found at end of line
33 | ERROR | [x] Whitespace found at end of line
51 | ERROR | [x] Inline comments must start with a capital letter
81 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
114 | ERROR | [ ] Type hint "array" missing for $form
131 | ERROR | [x] There should be no white space after an opening "("
131 | ERROR | [x] Expected one space after the comma, 0 found
131 | ERROR | [x] There should be no white space before a closing ")"
132 | ERROR | [x] list(...) is forbidden, use [...] instead.
132 | ERROR | [x] Expected one space after the comma, 0 found
132 | ERROR | [x] Expected one space after the comma, 0 found
132 | ERROR | [x] Expected one space after the comma, 0 found
133 | ERROR | [x] Expected 1 space before "="; 0 found
133 | ERROR | [x] Expected 1 space after "="; 0 found
134 | ERROR | [x] Expected 1 space before "="; 0 found
134 | ERROR | [x] Expected 1 space after "="; 0 found
136 | ERROR | [x] Expected one space after the comma, 0 found
136 | ERROR | [x] Expected one space after the comma, 0 found
137 | ERROR | [x] Expected 1 blank line after function; 0 found
138 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_mailmerge_field-3351816\views_mailmerge_field.info.yml
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
1 | WARNING | [ ] Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | [ ] Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | [ ] Remove "version" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | [ ] "core_version_requirement" property is missing in the info.yml file
7 | WARNING | [ ] All dependencies must be prefixed with the project name, for example "drupal:"
13 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_mailmerge_field-3351816\views_mailmerge_field.module
----------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
14 | ERROR | [x] Expected 1 blank line before function; 2 found
18 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
30 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 861ms; Memory: 6MB

Steps to reproduce

Run phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024