Fix the issues reported by PHPCS

Created on 20 April 2023, over 1 year ago
Updated 21 April 2023, over 1 year ago

Problem/Motivation

FILE: ...ar/www/html/contribution/drupal10/web/modules/contrib/eulerian/js/init.js
-------------------------------------------------------------------------------
FOUND 74 ERRORS AFFECTING 1 LINE
-------------------------------------------------------------------------------
16 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
16 | ERROR | [x] Expected 1 space before opening brace; found 0
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space after first semicolon of FOR loop; 0 found
16 | ERROR | [x] Expected 1 space before "-="; 0 found
16 | ERROR | [x] Expected 1 space after "-="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "*"; 0 found
16 | ERROR | [x] Expected 1 space after "*"; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before ">>>="; 0 found
16 | ERROR | [x] Expected 1 space after ">>>="; 0 found
16 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
16 | ERROR | [x] Expected 1 space before opening brace; found 0
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
16 | ERROR | [x] Expected 1 space before opening brace; found 0
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "/"; 0 found
16 | ERROR | [x] Expected 1 space after "/"; 0 found
16 | ERROR | [x] Expected 1 space before "|"; 0 found
16 | ERROR | [x] Expected 1 space after "|"; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "%"; 0 found
16 | ERROR | [x] Expected 1 space after "%"; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "-"; 0 found
16 | ERROR | [x] Expected 1 space after "-"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "%"; 0 found
16 | ERROR | [x] Expected 1 space after "%"; 0 found
16 | ERROR | [x] Expected 1 space before "+"; 0 found
16 | ERROR | [x] Expected 1 space after "+"; 0 found
16 | ERROR | [x] Expected 1 space before "="; 0 found
16 | ERROR | [x] Expected 1 space after "="; 0 found
16 | ERROR | [x] Space before opening parenthesis of function call prohibited
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 74 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: .../html/contribution/drupal10/web/modules/contrib/eulerian/eulerian.install
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...var/www/html/contribution/drupal10/web/modules/contrib/eulerian/README.md
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
-------------------------------------------------------------------------------
33 | WARNING | Line exceeds 80 characters; contains 89 characters
66 | WARNING | Line exceeds 80 characters; contains 119 characters
68 | WARNING | Line exceeds 80 characters; contains 87 characters
74 | WARNING | Line exceeds 80 characters; contains 118 characters
78 | WARNING | Line exceeds 80 characters; contains 122 characters
79 | WARNING | Line exceeds 80 characters; contains 123 characters
81 | WARNING | Line exceeds 80 characters; contains 108 characters
87 | WARNING | Line exceeds 80 characters; contains 141 characters
144 | WARNING | Line exceeds 80 characters; contains 93 characters
145 | WARNING | Line exceeds 80 characters; contains 82 characters
153 | WARNING | Line exceeds 80 characters; contains 82 characters
156 | WARNING | Line exceeds 80 characters; contains 87 characters
163 | WARNING | Line exceeds 80 characters; contains 100 characters
170 | WARNING | Line exceeds 80 characters; contains 118 characters
-------------------------------------------------------------------------------

FILE: .../drupal10/web/modules/contrib/eulerian/tests/src/EulerianTestInteface.php
-------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------
10 | ERROR | Interface name doesn't match filename; expected "interface
| | EulerianTestInteface"
-------------------------------------------------------------------------------

FILE: ...ontrib/eulerian/tests/src/FunctionalJavascript/EulerianStatusCodeTest.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
77 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
89 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: '"403/URL = "'
94 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: '"404/URL = "'
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...es/contrib/eulerian/tests/src/FunctionalJavascript/EulerianSearchTest.php
-------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------
71 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
104 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...contrib/eulerian/tests/src/FunctionalJavascript/EulerianPhpFilterTest.php
-------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------
107 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
130 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...b/eulerian/tests/src/FunctionalJavascript/EulerianCustomVariablesTest.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
54 | WARNING | Line exceeds 80 characters; contains 83 characters
-------------------------------------------------------------------------------

FILE: .../web/modules/contrib/eulerian/tests/src/Kernel/EulerianVisibilityTest.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
37 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...al10/web/modules/contrib/eulerian/tests/src/Kernel/EulerianHelperTest.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...tribution/drupal10/web/modules/contrib/eulerian/src/Form/SettingsForm.php
-------------------------------------------------------------------------------
FOUND 9 ERRORS AND 6 WARNINGS AFFECTING 15 LINES
-------------------------------------------------------------------------------
121 | ERROR | The array declaration extends to column 138 (the limit is
| | 80). The array content should be split up over multiple lines
122 | ERROR | The array declaration extends to column 83 (the limit is 80).
| | The array content should be split up over multiple lines
123 | ERROR | The array declaration extends to column 99 (the limit is 80).
| | The array content should be split up over multiple lines
125 | ERROR | The array declaration extends to column 101 (the limit is
| | 80). The array content should be split up over multiple lines
126 | ERROR | The array declaration extends to column 103 (the limit is
| | 80). The array content should be split up over multiple lines
129 | ERROR | The array declaration extends to column 98 (the limit is 80).
| | The array content should be split up over multiple lines
141 | WARNING | Line exceeds 80 characters; contains 83 characters
177 | WARNING | Line exceeds 80 characters; contains 92 characters
270 | WARNING | Line exceeds 80 characters; contains 83 characters
371 | WARNING | Line exceeds 80 characters; contains 85 characters
431 | WARNING | Line exceeds 80 characters; contains 92 characters
474 | WARNING | Line exceeds 80 characters; contains 85 characters
493 | ERROR | The array declaration extends to column 100 (the limit is
| | 80). The array content should be split up over multiple lines
527 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
544 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
-------------------------------------------------------------------------------

FILE: ...web/modules/contrib/eulerian/src/Services/EulerianVisibilityInterface.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
16 | WARNING | Line exceeds 80 characters; contains 87 characters
-------------------------------------------------------------------------------

FILE: ...ion/drupal10/web/modules/contrib/eulerian/src/Services/EulerianHelper.php
-------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------
44 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2
| | spaces
73 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...ulerian/modules/commerce_product/src/Event/CommerceProductParamsEvent.php
-------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
47 | ERROR | [x] Return type must not contain variable name "$product"
87 | ERROR | [ ] Unknown type hint "mixed" found for $value
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...ulerian/modules/commerce_checkout/src/Services/CommerceCheckoutHelper.php
-------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------
56 | ERROR | [x] Expected 1 space after "instanceof"; 2 found
83 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
84 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

FILE: ...w/html/contribution/drupal10/web/modules/contrib/eulerian/eulerian.module
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
90 | WARNING | Line exceeds 80 characters; contains 83 characters
-------------------------------------------------------------------------------

Time: 2.63 secs; Memory: 14MB

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 eulerian/

Proposed resolution

Fix all the issues for Drupal and DrupalPractice 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

Production build 0.71.5 2024