Code refactor for module

Created on 26 April 2023, over 1 year ago
Updated 28 April 2023, over 1 year ago

FILE: /var/www/html/Drupal/drupalp/web/modules/contrib/shorten/shorten.install
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
5 | ERROR | Doc comment short description must start with a capital letter
13 | WARNING | Line exceeds 80 characters; contains 81 characters
18 | WARNING | Format should be "* Implements hook_foo().", "* Implements
| | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
| | hook_foo_BAR_ID_bar() for block templates."
20 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
27 | WARNING | Format should be "* Implements hook_foo().", "* Implements
| | hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
| | hook_foo_BAR_ID_bar() for block templates."
28 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: /var/www/html/Drupal/drupalp/web/modules/contrib/shorten/README.md
------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------
47 | WARNING | Line exceeds 80 characters; contains 94 characters
48 | WARNING | Line exceeds 80 characters; contains 88 characters
------------------------------------------------------------------------

FILE: /var/www/html/Drupal/drupalp/web/modules/contrib/shorten/shorten.module
--------------------------------------------------------------------------------
FOUND 28 ERRORS AND 10 WARNINGS AFFECTING 37 LINES
--------------------------------------------------------------------------------
45 | ERROR | Comment indentation error, expected only 1 spaces
52 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
54 | ERROR | Missing parameter type
57 | ERROR | Missing parameter type
61 | ERROR | Return type missing for @return tag in function comment
69 | WARNING | Unused variable $original_for_caching.
75 | ERROR | Comment indentation error, expected only 1 spaces
94 | WARNING | Line exceeds 80 characters; contains 82 characters
112 | WARNING | Unused variable $expire.
115 | WARNING | Unused variable $expire.
118 | WARNING | Unused variable $expire.
121 | ERROR | The array declaration extends to column 83 (the limit is 80).
| | The array content should be split up over multiple lines
128 | ERROR | Missing parameter type
130 | ERROR | Missing parameter type
133 | ERROR | Missing parameter type
137 | ERROR | Return type missing for @return tag in function comment
185 | ERROR | The array declaration extends to column 145 (the limit is 80).
| | The array content should be split up over multiple lines
275 | ERROR | Missing parameter type
278 | ERROR | Missing parameter type
280 | ERROR | Missing parameter type
282 | ERROR | Missing parameter type
287 | ERROR | Return type missing for @return tag in function comment
307 | ERROR | The array declaration extends to column 189 (the limit is 80).
| | The array content should be split up over multiple lines
319 | ERROR | Comment indentation error, expected only 1 spaces
357 | WARNING | Potential security problem: SSL peer verification must not be
| | disabled
394 | ERROR | Type hint "array" missing for $contents
414 | ERROR | Return type missing for @return tag in function comment
417 | ERROR | Type hint "array" missing for $data
417 | ERROR | Type hint "array" missing for $path
432 | ERROR | Missing parameter type
434 | ERROR | Missing parameter type
437 | ERROR | Return type missing for @return tag in function comment
464 | ERROR | Missing parameter type
485 | WARNING | Line exceeds 80 characters; contains 105 characters
519 | ERROR | Doc comment short description must be on a single line,
| | further text should be a separate paragraph
574 | WARNING | Unused variable $language_code.
577 | WARNING | Unused variable $language_code.
580 | WARNING | Unused variable $sanitize.
--------------------------------------------------------------------------------

FILE: ...rupalp/web/modules/contrib/shorten/src/Plugin/Block/ShortenCurrentPage.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
67 | WARNING | There must be no blank line following an inline comment
--------------------------------------------------------------------------------

FILE: ...upal/drupalp/web/modules/contrib/shorten/src/Plugin/Block/ShortenBlock.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
67 | WARNING | There must be no blank line following an inline comment
--------------------------------------------------------------------------------

FILE: ...l/Drupal/drupalp/web/modules/contrib/shorten/src/Form/ShortenAdminForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
67 | WARNING | [ ] Unused variable $config.
93 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...Drupal/drupalp/web/modules/contrib/shorten/src/Form/ShortenShortenForm.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
25 | WARNING | Unused variable $form_state_values.
--------------------------------------------------------------------------------

FILE: ...ules/contrib/shorten/modules/shorten_cs/src/Form/CustomServicesAddForm.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
98 | WARNING | Unused variable $config.
126 | WARNING | Do not concatenate strings to translatable strings, they
| | should be part of the t() argument and you should use
| | placeholders
142 | WARNING | #options values usually have to run through t() for
| | translation
150 | WARNING | Translatable strings must not begin or end with white spaces,
| | use placeholders with t() for variables
151 | ERROR | Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
211 | ERROR | The array declaration extends to column 114 (the limit is 80).
| | The array content should be split up over multiple lines
--------------------------------------------------------------------------------

FILE: .../drupalp/web/modules/contrib/shorten/modules/shorten_cs/shorten_cs.install
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
5 | ERROR | Doc comment short description must start with a capital letter
--------------------------------------------------------------------------------

FILE: ...rupalp/web/modules/contrib/shorten/modules/shorten_cs/shorten_cs.admin.inc
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
19 | ERROR | Invalid function name, expected shorten_cs_edit_form but found
| | shortenCsEditForm
109 | ERROR | The $_GET super global must not be accessed directly; inject the
| | request.stack service and use
| | $stack->getCurrentRequest()->query->get('destination') instead
--------------------------------------------------------------------------------

FILE: ...p/web/modules/contrib/shorten/modules/record_shorten/record_shorten.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------
33 | WARNING | [x] '@TODO : This creates duplicate records. Needs to be
| | fixed.' should match the format '@todo Fix problem X here.'
44 | WARNING | [x] '@TODO : Views display plugin needs to be fixed.' should
| | match the format '@todo Fix problem X here.'
46 | ERROR | [ ] Comment indentation error, expected only 1 spaces
59 | ERROR | [ ] The array declaration extends to column 100 (the limit is
| | 80). The array content should be split up over multiple
| | lines
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ten/modules/record_shorten/record_shorten_views_handler_field_hostname.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
10 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
--------------------------------------------------------------------------------

FILE: .../record_shorten/src/record_shorten_views_handler_filter_string_service.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
8 | ERROR | Class name doesn't match filename; expected "class
| | record_shorten_views_handler_filter_string_service"
10 | ERROR | Doc comment is empty
--------------------------------------------------------------------------------

FILE: ...modules/record_shorten/src/record_shorten_views_handler_field_hostname.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
7 | ERROR | Doc comment short description must be on a single line, further
| | text should be a separate paragraph
9 | ERROR | Class name doesn't match filename; expected "class
| | record_shorten_views_handler_field_hostname"
11 | ERROR | Doc comment is empty
24 | ERROR | Doc comment is empty
--------------------------------------------------------------------------------

FILE: .../contrib/shorten/modules/record_shorten/src/Form/RecordshortenClearAll.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
44 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇮🇳India Vinni_Kadyan

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

Comments & Activities

Production build 0.71.5 2024