Fix the issues reported by PHPCS

Created on 17 April 2023, over 1 year ago
Updated 19 April 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/fwl/js/fwl.js
---------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------
26 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
30 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
32 | ERROR | [x] Expected 1 space before "%"; 0 found
32 | ERROR | [x] Expected 1 space after "%"; 0 found
43 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
44 | ERROR | [x] Expected 1 space before "%"; 0 found
44 | ERROR | [x] Expected 1 space after "%"; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/fwl/Readme.md
---------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 151 characters
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

FILE: ...r/www/html/contribution/drupal10/web/modules/contrib/fwl/fwl.libraries.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/fwl/fwl.module
--------------------------------------------------------------------------------
FOUND 12 ERRORS AND 6 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
7 | ERROR | [x] There must be one blank line after the last USE statement;
| | 2 found;
13 | ERROR | [x] Expected 1 blank line before function; 2 found
23 | ERROR | [x] Expected 1 blank line after function; 2 found
34 | ERROR | [x] Expected 1 blank line after function; 2 found
40 | WARNING | [ ] Line exceeds 80 characters; contains 109 characters
40 | ERROR | [x] No space found before comment text; expected "// function
| | field_widget_layout_field_widget_form_alter(&$element,
| | FormStateInterface $form_state, $context) {" but found
| | "//function
| | field_widget_layout_field_widget_form_alter(&$element,
| | FormStateInterface $form_state, $context) {"
40 | ERROR | [x] Inline comments must start with a capital letter
41 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
43 | ERROR | [ ] Comment indentation error, expected only 2 spaces
53 | WARNING | [ ] Line exceeds 80 characters; contains 152 characters
56 | WARNING | [ ] There must be no blank line following an inline comment
56 | ERROR | [x] No space found before comment text; expected "// }" but
| | found "//}"
56 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
62 | ERROR | [x] Expected 1 blank line before function; 2 found
79 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/fwl/css/fwl.css
-----------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 11 LINES
-----------------------------------------------------------------------------
2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
3 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
21 | ERROR | [x] Expected 1 newline at end of file; 2 found
22 | ERROR | [x] Additional whitespace found at end of file
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /var/www/html/contribution/drupal10/web/modules/contrib/fwl/fwl.info.yml
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------

Time: 375ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig fwl/

Proposed resolution

Fix all the reported issues for Drupal and DrupalPractice coding standards

Remaining tasks

Patch Review

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024