Problem/Motivation
Getting following error/warnings
FILE: /app/modules/contrib/tagclouds/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 132 characters
4 | WARNING | Line exceeds 80 characters; contains 172 characters
----------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/config/install/tagclouds.settings.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/config/schema/tagclouds.schema.yml
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
20 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/CloudBuilder.php
----------------------------------------------------------------------------------------------------------------------
FOUND 56 ERRORS AND 5 WARNINGS AFFECTING 54 LINES
----------------------------------------------------------------------------------------------------------------------
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
38 | ERROR | [ ] Parameter $language_manager is not described in comment
92 | ERROR | [x] Expected 3 space(s) before asterisk; 1 found
92 | ERROR | [x] Doc comment short description must end with a full stop
93 | ERROR | [x] Expected 3 space(s) before asterisk; 1 found
94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
95 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
96 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
97 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
98 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
99 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
100 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
101 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
103 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
111 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
115 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
115 | ERROR | [x] Missing function doc comment
116 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
116 | WARNING | [ ] Unused variable $term.
116 | WARNING | [ ] Node::load calls should be avoided in classes, use dependency injection instead
117 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
118 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
119 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
120 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
121 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
122 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
124 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
132 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
133 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
134 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
136 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
137 | ERROR | [x] Doc comment short description must end with a full stop
139 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
140 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
140 | WARNING | [ ] Unused variable $term.
140 | WARNING | [ ] Node::load calls should be avoided in classes, use dependency injection instead
141 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
142 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
143 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
144 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
145 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
147 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
152 | ERROR | [x] Expected 1 space after "=>"; 2 found
155 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
156 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
157 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
159 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
159 | ERROR | [x] Missing function doc comment
160 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
161 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
162 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
163 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
164 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
165 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
167 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
172 | ERROR | [x] Expected 1 space after "=>"; 2 found
175 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
176 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
177 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 55 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/CloudBuilderInterface.php
---------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------
9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
16 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
18 | ERROR | [x] Expected 1 blank line after function; 0 found
19 | ERROR | [x] The closing brace for the interface must have an empty line before it
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/Controller/TagcloudsListVocs.php
----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------
68 | ERROR | [x] Data types in @throws tags need to be fully namespaced
79 | WARNING | [ ] Vocabulary::load calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/Controller/TagcloudsPageChunk.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
19 | ERROR | [ ] Missing short description in doc comment
20 | ERROR | [x] Do not append variable name "$tagcloudTag" to the type declaration in a member variable comment
25 | ERROR | [ ] Missing short description in doc comment
26 | ERROR | [x] Do not append variable name "$tagcloudsCloudBuilder" to the type declaration in a member variable comment
70 | WARNING | [ ] Vocabulary::loadMultiple calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/Form/TagcloudsAdminPage.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 1 WARNING AFFECTING 17 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
20 | ERROR | [ ] Missing @var tag in member variable comment
23 | ERROR | [ ] Parameter $language_manager is not described in comment
57 | ERROR | [x] Each index in a multi-line array must be on a new line
58 | ERROR | [x] Each index in a multi-line array must be on a new line
59 | WARNING | [x] A comma should follow the last multiline array item. Found: )
70 | ERROR | [ ] The array declaration extends to column 119 (the limit is 80). The array content should be split up over multiple lines
81 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
82 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
83 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
84 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
88 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
89 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
90 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
91 | ERROR | [x] Array indentation error, expected 6 spaces but found 5
153 | ERROR | [x] Visibility must be declared on method "getEditableConfigNames"
155 | ERROR | [x] Expected 1 blank line after function; 0 found
156 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/Plugin/Block/TagcloudsTermsBlock.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
104 | ERROR | [x] Use null coalesce operator instead of ternary operator.
105 | ERROR | [x] Use null coalesce operator instead of ternary operator.
140 | WARNING | [ ] Vocabulary::load calls should be avoided in classes, use dependency injection instead
164 | ERROR | [ ] The array declaration extends to column 116 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/TagService.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
13 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
62 | ERROR | [x] list(...) is forbidden, use [...] instead.
94 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
113 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
153 | ERROR | [ ] The array declaration extends to column 153 (the limit is 80). The array content should be split up over multiple lines
166 | ERROR | [ ] Missing parameter type
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/src/TagServiceInterface.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
38 | WARNING | Line exceeds 80 characters; contains 81 characters
-----------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/tagclouds.libraries.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/tagclouds.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 7 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
28 | WARNING | [x] A comma should follow the last multiline array item. Found: NULL
29 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
34 | WARNING | [x] A comma should follow the last multiline array item. Found: NULL
35 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
36 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
42 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
42 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
45 | ERROR | [ ] The array declaration extends to column 132 (the limit is 80). The array content should be split up over multiple lines
45 | ERROR | [ ] The array declaration extends to column 200 (the limit is 80). The array content should be split up over multiple lines
50 | WARNING | [ ] Line exceeds 80 characters; contains 108 characters
50 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
53 | ERROR | [ ] The array declaration extends to column 143 (the limit is 80). The array content should be split up over multiple lines
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/tagclouds.permissions.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/tagclouds/tagclouds.services.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 702ms; Memory: 12MB
Steps to reproduce
Steps to reproduce
Run following command
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/tagclouds/
Proposed resolution
Above error/warnings need to be fixed
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3327536-drupal-coding-standards-4.patch | 29.57 KB | anoopsingh92 |
| #2 | 3327536-2.patch | 29.23 KB | samitk |
Issue fork tagclouds-3327536
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
samitk commentederror/warnings are fixed.
Comment #3
LeoAlcci commentedI didn't find any phpcs issues, and the module is working fine. Moving to RTBC.
Comment #5
anoopsingh92I reviewed that patch #2. The patch has been applied successfully. but after applying the patch, I had run the
phpcscommand then I got some coding standard issues.Re-rolled the patch please review this. Thanks.
Comment #6
LeoAlcci commentedI tested the new patch, seems like phpcs was in the twig file. I check it twice phpcs command, and I didn't find any issues with patch#4 moving to RTBC.
Comment #7
joseph.olstadThis change conflicts with other 'to be reviewed' patches.
Postponing this.
Comment #9
joseph.olstadPersonally I 100% disagree with the 80 characters per line limit
Your phpcs settings should be increased to 120 characters but now it is 80 columns
With that said, I reluctantly put this in. There were conflicts with other recent changes so it is incomplete.
Comment #10
joseph.olstad