Fix the issues reported by phpcs

Created on 13 January 2020, over 5 years ago
Updated 13 May 2023, almost 2 years ago

Please fix below issues :

Review of the 8.x-1.x branch (commit 9c78611):

Your README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
The INTRODUCTION section is missing.
The REQUIREMENTS section is missing.
The INSTALLATION section is missing.
The CONFIGURATION section is missing.
The views_custom_cache_tag_demo.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu ... .
Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
DrupalPractice has found some issues with your code, but could be false positives.

FILE: ...ewsh/pareview_temp/modules/demo/views_custom_cache_tag_demo.info.yml
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------
4 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
5 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
6 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
7 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
8 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
9 | WARNING | All dependencies must be prefixed with the project name,
| | for example "drupal:"
--------------------------------------------------------------------------

FILE: ...drupal/pareviewsh/pareview_temp/src/Plugin/views/cache/CustomTag.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
107 | WARNING | Unused variable $table.
--------------------------------------------------------------------------

Time: 488ms; Memory: 4Mb

This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...viewsh/pareview_temp/modules/demo/views_custom_cache_tag_demo.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
16 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

FILE: ...drupal/pareviewsh/pareview_temp/src/Plugin/views/cache/CustomTag.php
--------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
32 | ERROR | [ ] Missing @var tag in member variable comment
47 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
69 | ERROR | [x] Short array syntax must be used to define arrays
79 | ERROR | [x] Short array syntax must be used to define arrays
83 | ERROR | [x] Short array syntax must be used to define arrays
92 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
115 | ERROR | [x] Expected 1 space after "="; 2 found
115 | ERROR | [x] Expected 1 space before opening brace; found 0
115 | ERROR | [x] Expected 1 space before opening brace; found 0
115 | ERROR | [x] Opening brace must be the last content on the line
115 | ERROR | [x] There should be no white space after an opening "{"
115 | ERROR | [x] Closing brace must be on a line by itself
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

FILE: ...areviewsh/pareview_temp/tests/src/Functional/CustomCacheTagsTest.php
--------------------------------------------------------------------------
FOUND 57 ERRORS AND 5 WARNINGS AFFECTING 39 LINES
--------------------------------------------------------------------------
28 | ERROR | [x] Short array syntax must be used to define arrays
33 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'views_custom_cache_tag_demo'
41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
| | 1
42 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
43 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
44 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
45 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
46 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
47 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
48 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
49 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
50 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
87 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
87 | ERROR | [x] Short array syntax must be used to define arrays
88 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
88 | ERROR | [x] Short array syntax must be used to define arrays
95 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
101 | ERROR | [x] Array closing indentation error, expected 4 spaces
| | but found 12
111 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
122 | ERROR | [x] Short array syntax must be used to define arrays
122 | ERROR | [x] Short array syntax must be used to define arrays
134 | ERROR | [x] Short array syntax must be used to define arrays
134 | ERROR | [x] Short array syntax must be used to define arrays
148 | ERROR | [x] Short array syntax must be used to define arrays
148 | ERROR | [x] Short array syntax must be used to define arrays
148 | ERROR | [x] Short array syntax must be used to define arrays
148 | ERROR | [x] Short array syntax must be used to define arrays
155 | ERROR | [x] Short array syntax must be used to define arrays
155 | ERROR | [x] Short array syntax must be used to define arrays
155 | ERROR | [x] Short array syntax must be used to define arrays
155 | ERROR | [x] Short array syntax must be used to define arrays
170 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
180 | ERROR | [x] Short array syntax must be used to define arrays
181 | ERROR | [x] Short array syntax must be used to define arrays
181 | ERROR | [x] Short array syntax must be used to define arrays
181 | ERROR | [x] Short array syntax must be used to define arrays
183 | ERROR | [x] Short array syntax must be used to define arrays
183 | ERROR | [x] Short array syntax must be used to define arrays
194 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'user_view'
197 | ERROR | [x] Short array syntax must be used to define arrays
197 | ERROR | [x] Short array syntax must be used to define arrays
197 | ERROR | [x] Short array syntax must be used to define arrays
197 | ERROR | [x] Short array syntax must be used to define arrays
205 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
207 | ERROR | [x] Short array syntax must be used to define arrays
210 | ERROR | [x] Short array syntax must be used to define arrays
210 | ERROR | [x] Short array syntax must be used to define arrays
210 | ERROR | [x] Short array syntax must be used to define arrays
218 | ERROR | [x] Short array syntax must be used to define arrays
219 | ERROR | [x] Short array syntax must be used to define arrays
226 | ERROR | [x] Short array syntax must be used to define arrays
226 | ERROR | [x] Short array syntax must be used to define arrays
226 | ERROR | [x] Short array syntax must be used to define arrays
227 | ERROR | [x] Short array syntax must be used to define arrays
227 | ERROR | [x] Short array syntax must be used to define arrays
227 | ERROR | [x] Short array syntax must be used to define arrays
238 | ERROR | [ ] Parameter tags must be grouped together in a doc
| | comment
238 | ERROR | [x] Expected "array|false" but found "array|FALSE" for
| | parameter type
244 | ERROR | [x] Short array syntax must be used to define arrays
249 | ERROR | [x] Short array syntax must be used to define arrays
257 | ERROR | [x] Expected 1 blank line after function; 0 found
258 | ERROR | [x] The closing brace for the class must have an empty
| | line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 59 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.06 secs; Memory: 6Mb

📌 Task
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇮🇳India Ankush_03 Gurgaon, 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