Drupal coding standard | phpcs

Created on 23 December 2022, over 1 year ago
Updated 25 January 2023, over 1 year ago

getting issues and warnings in phpcs

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/tests/modules/views_ajax_get_cache_test/views_ajax_get_cache_test.info.yml
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/tests/src/FunctionalJavascript/ExposedFilterViewsAjaxGetTest.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
45 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
59 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
72 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
80 | WARNING | [x] There must be no blank line following an inline comment
80 | WARNING | [ ] There must be no blank line following an inline comment
88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
95 | WARNING | [x] There must be no blank line following an inline comment
95 | WARNING | [ ] There must be no blank line following an inline comment
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/src/CacheableViewsAjaxResponse.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Missing class doc comment
31 | ERROR | [ ] unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
37 | WARNING | [ ] Unused variable $request.
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/src/EventSubscriber/RouteAlterSubscriber.php
------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Missing class doc comment
11 | ERROR | [x] Missing function doc comment
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/src/EventSubscriber/AjaxResponseSubscriber.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
16 | ERROR | [x] Missing function doc comment
29 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/src/CacheableAjaxResponse.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
9 | ERROR | [x] Missing class doc comment
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/views_ajax_get/views_ajax_get.module
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
29 | ERROR | Description for the @return value is missing
-------------------------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

RTBC

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia noorulshameera

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024