Fix the issues reported by PHP_CodeSniffer

Created on 23 September 2024, 7 months ago

Problem/Motivation

FILE: modules\revealjs\readme.md
-----------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------
29 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
30 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
78 | ERROR | [x] Expected 1 newline at end of file; 5 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: modules\revealjs\revealjs.install
-----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
4 | ERROR | [x] Doc comment short description must end with a full stop
10 | ERROR | [x] Expected 1 space before opening brace; found 0
18 | WARNING | [x] A comma should follow the last multiline array item. Found: '/libraries/reveal.js/dist/reveal.css'
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

FILE: modules\revealjs\revealjs.module
-------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 space before opening brace; found 0
16 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
17 | ERROR | [x] No space found before comment text; expected "// Help for the module" but found "//Help for the module"
17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
37 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
78 | ERROR | [x] Expected one space after the comma, 0 found
105 | ERROR | [ ] Missing parameter comment
110 | ERROR | [x] Short array syntax must be used to define arrays
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: modules\revealjs\src\Form\RevealjsAdminSettingsForm.php
--------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 3 WARNINGS AFFECTING 13 LINES
--------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Link.
9 | WARNING | [x] Unused use statement
19 | ERROR | [ ] Public method name "RevealjsAdminSettingsForm::getFormID" is not in lowerCamel format
23 | ERROR | [x] Missing function doc comment
127 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
128 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
129 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
130 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
131 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
132 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
135 | ERROR | [x] Expected 1 blank line after function; 0 found
149 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
149 | ERROR | [x] Expected one space after the comma, 2 found
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------

FILE: modules\revealjs\src\Plugin\views\style\Revealjs.php
-------------------------------------------------------------------------------------------------
FOUND 46 ERRORS AFFECTING 45 LINES
-------------------------------------------------------------------------------------------------
9 | ERROR | [x] Doc comment short description must end with a full stop
18 | ERROR | [x] There must be exactly one newline after the class comment
33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
38 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
40 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
48 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
50 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
51 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
53 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
54 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
56 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
58 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
60 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
62 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
63 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
64 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
68 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
69 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
70 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
71 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
73 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
76 | ERROR | [x] Missing function doc comment
84 | ERROR | [x] Expected 1 space before "=>"; 0 found
385 | ERROR | [x] Expected 1 blank line after function; 0 found
386 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 46 MARKED SNIFF VIOLATIONS AUTOMATICALLY

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.
Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

šŸ“Œ Task
Status

Needs work

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024