phpcs drupal coding standard issues

Created on 30 January 2023, almost 2 years ago
Updated 9 November 2023, about 1 year ago

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\image_field_extras\image_field_extras.install
----------------------------------------------------------------------------------------------------
FOUND 41 ERRORS AND 2 WARNINGS AFFECTING 43 LINES
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
13 | ERROR | [x] Short array syntax must be used to define arrays
15 | ERROR | [x] Short array syntax must be used to define arrays
16 | ERROR | [x] Short array syntax must be used to define arrays
23 | ERROR | [x] Short array syntax must be used to define arrays
30 | ERROR | [x] Short array syntax must be used to define arrays
35 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
37 | ERROR | [x] Short array syntax must be used to define arrays
43 | ERROR | [x] Short array syntax must be used to define arrays
49 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
74 | ERROR | [x] Short array syntax must be used to define arrays
80 | ERROR | [x] Short array syntax must be used to define arrays
81 | ERROR | [x] Short array syntax must be used to define arrays
82 | ERROR | [x] Short array syntax must be used to define arrays
83 | ERROR | [x] Short array syntax must be used to define arrays
84 | ERROR | [x] Short array syntax must be used to define arrays
85 | ERROR | [x] Short array syntax must be used to define arrays
87 | ERROR | [x] Short array syntax must be used to define arrays
97 | ERROR | [x] Short array syntax must be used to define arrays
99 | ERROR | [x] Short array syntax must be used to define arrays
100 | ERROR | [x] Short array syntax must be used to define arrays
107 | ERROR | [x] Short array syntax must be used to define arrays
114 | ERROR | [x] Short array syntax must be used to define arrays
119 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
121 | ERROR | [x] Short array syntax must be used to define arrays
127 | ERROR | [x] Short array syntax must be used to define arrays
133 | ERROR | [x] Short array syntax must be used to define arrays
140 | ERROR | [x] Short array syntax must be used to define arrays
146 | ERROR | [x] Short array syntax must be used to define arrays
152 | ERROR | [x] Short array syntax must be used to define arrays
158 | ERROR | [x] Short array syntax must be used to define arrays
164 | ERROR | [x] Short array syntax must be used to define arrays
165 | ERROR | [x] Short array syntax must be used to define arrays
166 | ERROR | [x] Short array syntax must be used to define arrays
167 | ERROR | [x] Short array syntax must be used to define arrays
168 | ERROR | [x] Short array syntax must be used to define arrays
169 | ERROR | [x] Short array syntax must be used to define arrays
171 | ERROR | [x] Short array syntax must be used to define arrays
187 | ERROR | [ ] Empty installation hooks are not necessary
194 | ERROR | [ ] Empty installation hooks are not necessary
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 41 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\image_field_extras\image_field_extras.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AND 5 WARNINGS AFFECTING 29 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | WARNING | [x] Unused use statement
57 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_image_field_photo_credit_widget_process" but expected
| | "image_field_extras__image_field_photo_credit_widget_process"
99 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_image_field_caption_title_widget_process" but expected
| | "image_field_extras__image_field_caption_title_widget_process"
140 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_image_field_caption_text_widget_process" but expected
| | "image_field_extras__image_field_caption_text_widget_process"
282 | WARNING | [ ] Line exceeds 80 characters; contains 170 characters
283 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 6
309 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 12
310 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
311 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
312 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
313 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
314 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
315 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
316 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
317 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
318 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
319 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
320 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 12
322 | ERROR | [x] Line indented incorrectly; expected 11 spaces, found 10
346 | WARNING | [ ] Line exceeds 80 characters; contains 145 characters
347 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 6
356 | WARNING | [x] There must be no blank line following an inline comment
359 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
360 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
364 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
364 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
365 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
367 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
368 | ERROR | [x] Line indented incorrectly; expected 3 spaces, found 0
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\contribution\web\modules\contrib\image_field_extras\image_field_extras.module
---------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES
---------------------------------------------------------------------------------------------------
15 | WARNING | There must be no blank line following an inline comment
63 | WARNING | Unused variable $field_definition.
66 | WARNING | Unused variable $field_definition.
69 | WARNING | Unused variable $field_definition.
105 | WARNING | Unused variable $field_definition.
108 | WARNING | Unused variable $field_definition.
111 | WARNING | Unused variable $field_definition.
146 | WARNING | Unused variable $field_definition.
149 | WARNING | Unused variable $field_definition.
152 | WARNING | Unused variable $field_definition.
202 | WARNING | There must be no blank line following an inline comment
---------------------------------------------------------------------------------------------------

๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.kelotra Indore

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

Comments & Activities

  • Issue created by @akshay.kelotra
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia akshay.kelotra Indore

    I have fixed this issue and providing a patch.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Charchil Khandelwal โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to Charchil Khandelwal
  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    FILE: ...\abc\drupal\modules\image_field_extras\image_field_extras.module
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
    15 | WARNING | There must be no blank line following an inline
    | | comment
    ----------------------------------------------------------------------

    FILE: ...ocs\abc\drupal\modules\image_field_extras\src\ImageExtraItem.php
    ----------------------------------------------------------------------
    FOUND 1 ERROR AND 9 WARNINGS AFFECTING 10 LINES
    ----------------------------------------------------------------------
    8 | ERROR | Doc comment is empty
    46 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    48 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    54 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    67 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    69 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    75 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    88 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    90 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    96 | WARNING | t() calls should be avoided in classes, use
    | | \Drupal\Core\StringTranslation\StringTranslationTrait
    | | and $this->t() instead
    ----------------------------------------------------------------------

    FILE: ...\abc\drupal\modules\image_field_extras\src\ImageExtraStorage.php
    ----------------------------------------------------------------------
    FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
    ----------------------------------------------------------------------
    53 | ERROR | Parameter $cacheTagsInvalidator is not described in
    | | comment
    72 | WARNING | Line exceeds 80 characters; contains 81 characters
    216 | WARNING | Line exceeds 80 characters; contains 87 characters
    288 | WARNING | Line exceeds 80 characters; contains 87 characters
    405 | ERROR | Doc comment is empty
    ----------------------------------------------------------------------

    Need to fix these errors and warnings.

  • @charchil-khandelwal opened merge request.
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Some warnings and errors are fixed now.

    Please review.

  • @_pratik_ opened merge request.
  • First commit to issue fork.
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia _pratik_ Banglore
  • First commit to issue fork.
  • ๐Ÿ‡ต๐Ÿ‡ฐPakistan Qandeel Islamabad, Pakistan
  • Status changed to Fixed about 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ฐPakistan Qandeel Islamabad, Pakistan
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024