Fix the issues reported by phpcs

Created on 14 June 2023, about 1 year ago
Updated 15 June 2023, about 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/entity_count_analyzer/entity_count_analyzer.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: .../html/vb/d_cont/entity_count_analyzer/entity_count_analyzer.links.task.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
23 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/entity_count_analyzer/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 291 characters
7 | WARNING | Line exceeds 80 characters; contains 218 characters
9 | WARNING | Line exceeds 80 characters; contains 228 characters
11 | WARNING | Line exceeds 80 characters; contains 213 characters
13 | WARNING | Line exceeds 80 characters; contains 213 characters
15 | WARNING | Line exceeds 80 characters; contains 213 characters
17 | WARNING | Line exceeds 80 characters; contains 172 characters
23 | WARNING | Line exceeds 80 characters; contains 87 characters
25 | WARNING | Line exceeds 80 characters; contains 81 characters
27 | WARNING | Line exceeds 80 characters; contains 122 characters
29 | WARNING | Line exceeds 80 characters; contains 157 characters
----------------------------------------------------------------------

FILE: ...ont/entity_count_analyzer/src/Controller/EntityCountAnalyzerController.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
60 | WARNING | [ ] NodeType::loadMultiple calls should be avoided in classes,
| | use dependency injection instead
237 | WARNING | [ ] Vocabulary::loadMultiple calls should be avoided in
| | classes, use dependency injection instead
269 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
293 | ERROR | [x] Expected 1 blank line after function; 0 found
294 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ar/www/html/vb/d_cont/entity_count_analyzer/entity_count_analyzer.info.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
1 | WARNING | [ ] Remove "project" from the info file, it will be added by
| | drupal.org packaging automatically
1 | WARNING | [ ] Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
13 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...www/html/vb/d_cont/entity_count_analyzer/entity_count_analyzer.routing.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
8 | WARNING | [ ] The administration page callback should probably use
| | "administer site configuration" - which implies the user
| | can change something - rather than "access administration
| | pages" which is about viewing but not changing
| | configurations.
17 | WARNING | [ ] The administration page callback should probably use
| | "administer site configuration" - which implies the user
| | can change something - rather than "access administration
| | pages" which is about viewing but not changing
| | configurations.
26 | WARNING | [ ] The administration page callback should probably use
| | "administer site configuration" - which implies the user
| | can change something - rather than "access administration
| | pages" which is about viewing but not changing
| | configurations.
35 | WARNING | [ ] The administration page callback should probably use
| | "administer site configuration" - which implies the user
| | can change something - rather than "access administration
| | pages" which is about viewing but not changing
| | configurations.
35 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 136ms; Memory: 10MB

Steps to reproduce

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

Proposed resolution

Fix all the issues for Drupal and DrupalPractice coding standards

Remaining tasks

Patch Review

📌 Task
Status

Needs review

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.69.0 2024