Phpcs Drupal coding standard issue

Created on 13 February 2023, over 1 year ago
Updated 21 June 2024, 7 days ago

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/live_blog.theme.inc
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/live_blog.routing.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
-----------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/live_blog.module
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
18 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
19 | ERROR | [x] No space found before comment text; expected "// $output .= '

' . t('Demo') . '

';" but found "//$output .= '

' . t('Demo') . '

';"
20 | WARNING | [ ] Line exceeds 80 characters; contains 121 characters
20 | ERROR | [x] No space found before comment text; expected "// $output .= '

' . t(' | | target="_blank">https://www.youtube.com/') . '

';" but found "//$output .= '

' . t(' | | target="_blank">https://www.youtube.com/') . '

';"
25 | WARNING | [x] A comma should follow the last multiline array item. Found: )
32 | WARNING | [x] A comma should follow the last multiline array item. Found: )
167 | ERROR | [x] Doc comment short description must end with a full stop
168 | ERROR | [ ] Wrong function doc comment end; expected "*/", found "****************************/"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/live_blog.install
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/LiveBlogEntityListBuilder.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
29 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Plugin/Field/FieldFormatter/LiveBlogStatusFormatterDefault.php
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
10 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
36 | ERROR | [x] No space found before comment text; expected "// / Get all Live Blog posts by Parent ID." but found "/// Get all Live Blog posts by Parent ID."
37 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
48 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
74 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Controller/APIController.php
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------
78 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-----------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/LiveBlogEntityStorageInterface.php
-----------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
20 | WARNING | Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Entity/LiveBlogEntityViewBuilder.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
43 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
61 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Form/LiveBlogEntityRevisionDeleteForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Form/LiveBlogEntitySettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
61 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
62 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
63 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
64 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
65 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
66 | 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 | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Form/LiveBlogEntityRevisionRevertForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
114 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/src/Form/LiveBlogEntityForm.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
37 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/live_blog/live_blog.permissions.yml
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
27 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia himanshu_jhaloya Mandsaur

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024