Fix Drupal Coding Standard Errors

Created on 12 October 2020, over 4 years ago
Updated 28 July 2023, over 1 year ago

Problem/Motivation

FILE: /cheeseburger_menu/src/Plugin/Block/CheeseburgerMenu.php
------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AND 1 WARNING AFFECTING 21 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------
 176 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 177 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 178 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 179 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 180 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 181 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 182 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 183 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 189 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 193 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 197 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 198 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 199 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
 200 | ERROR   | [x] Array closing indentation error, expected 4 spaces but found 6
 303 | ERROR   | [x] No space found before comment text; expected "// unset($form['phone']);" but found "//unset($form['phone']);"
 322 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 475 | ERROR   | [x] Expected one space after the comma, 0 found
 492 | ERROR   | [x] Expected newline after closing brace
 533 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 533 | ERROR   | [ ] The text '@deprecated ' does not match the standard format: @deprecated in %deprecation-version% and is removed from
     |         |     %removal-version%. %extra-info%.
 533 | ERROR   | [ ] Each @deprecated tag must have a @see tag immediately following it.
 550 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 550 | ERROR   | [ ] The text '@deprecated ' does not match the standard format: @deprecated in %deprecation-version% and is removed from
     |         |     %removal-version%. %extra-info%.
 550 | ERROR   | [ ] Each @deprecated tag must have a @see tag immediately following it.
 591 | ERROR   | [x] Concat operator must be surrounded by a single space
------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /cheeseburger_menu/js/cheeseburger_menu.js
------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 9 LINES
------------------------------------------------------------------------------------------------
  68 | ERROR | [x] Expected newline after closing brace
 131 | ERROR | [x] Expected 1 space before "-"; 0 found
 131 | ERROR | [x] Expected 1 space after "-"; 0 found
 131 | ERROR | [x] Expected 1 space before "-"; 0 found
 131 | ERROR | [x] Expected 1 space after "-"; 0 found
 131 | ERROR | [x] Expected 1 space before "="; 0 found
 131 | ERROR | [x] Expected 1 space after "="; 0 found
 167 | ERROR | [x] Expected newline after closing brace
 178 | ERROR | [x] Expected 1 space before "-"; 0 found
 178 | ERROR | [x] Expected 1 space after "-"; 0 found
 181 | ERROR | [x] Expected newline after closing brace
 219 | ERROR | [x] Expected newline after closing brace
 219 | ERROR | [x] Newline required after opening brace
 225 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 242 | ERROR | [x] Expected 1 space before "-"; 0 found
 242 | ERROR | [x] Expected 1 space after "-"; 0 found
 242 | ERROR | [x] Expected 1 space before "-"; 0 found
 242 | ERROR | [x] Expected 1 space after "-"; 0 found
 242 | ERROR | [x] Expected 1 space before "="; 0 found
 242 | ERROR | [x] Expected 1 space after "="; 0 found
 272 | ERROR | [x] Expected 1 space before "-"; 0 found
 272 | ERROR | [x] Expected 1 space after "-"; 0 found
 272 | ERROR | [x] Expected 1 space before "-"; 0 found
 272 | ERROR | [x] Expected 1 space after "-"; 0 found
------------------------------------------------------------------------------------------------

FILE: /cheeseburger_menu/cheesebuger_menu.api.php
-------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  6 | ERROR | [x] Closing brace must be on a line by itself
 11 | ERROR | [x] Closing brace must be on a line by itself
-------------------------------------------------------------------------------------------------

Proposed resolution

Need to fix the errors as per Drupal coding standards.

User interface changes

NONE

API changes

NONE

Data model changes

NONE

📌 Task
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇮🇳India ankithashetty Karnataka, India

Live updates comments and jobs are added and updated live.
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