Fix the issues reported by phpcs

Created on 21 July 2022, almost 2 years ago
Updated 16 May 2023, about 1 year ago

Need to resolve the PHPCS coding standard issue 8.x-1.x-dev version.

FILE: /drupal/myproject/dismissible_message_bar/dismissible_message_bar.libraries.yml
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/dismissible_message_bar.links.action.yml
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/dismissible_message_bar.links.menu.yml
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
25 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/dismissible_message_bar.install
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
139 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/DmbNotificationsEntityListBuilder.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: /drupal/myproject/dismissible_message_bar/src/Form/DmbNotificationTypeDeleteConfirm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Form/DmbNotificationsEntitySettingsForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
12 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Form/DmbNotificationsEntityForm.php
---------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
19 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Form/DmbNotificationTypeForm.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------
13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
39 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Plugin/Block/DmbNotificationsBlock.php
------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------
26 | ERROR | Missing short description in doc comment
31 | ERROR | Missing short description in doc comment
36 | ERROR | Missing short description in doc comment
------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Plugin/Field/FieldType/ContentTypeFieldType.php
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Plugin/Field/FieldWidget/ContentTypeFieldWidget.php
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
75 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Service/DmbNotificationService.php
----------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 3 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
17 | WARNING | [x] Unused use statement
19 | WARNING | [x] Unused use statement
25 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
144 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
214 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
255 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/src/Entity/DmbNotificationsEntity.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
5 | ERROR | [x] Non-namespaced classes/interfaces/traits should not be referenced with use statements
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/dismissible_message_bar.links.task.yml
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
32 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/js/dismissible_message_bar.js
----------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 23 LINES
----------------------------------------------------------------------------------------------
1 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
17 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
30 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
67 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
75 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
75 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
82 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
87 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
91 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
93 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
98 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
99 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
106 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
109 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
122 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
133 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
139 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
144 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
148 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
153 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
161 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
181 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
182 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
210 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /drupal/myproject/dismissible_message_bar/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
19 | WARNING | Line exceeds 80 characters; contains 81 characters
20 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------

Steps to reproduce
use command: phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ./

📌 Task
Status

Closed: outdated

Version

1.0

Component

Documentation

Created by

🇮🇳India Dharti Patel

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.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.

  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Ashutosh Ahirwal India

    Providing patch with phpcs fixes.

  • 🇮🇳India Jaspreet-Kaur

    patch #10 fixed the all issues.

  • Status changed to Needs work about 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The status is for the issue summary, which still does not show which command and which arguments have been used.

  • Status changed to Closed: outdated about 1 year ago
  • 🇺🇸United States Mojiferous
  • 🇮🇳India Kaustab_Roy

    Note even though maintainer has closed the issue, these were my findings as per comment#12.

    Reviewed patch#10 addresses the DrupalPractices standards
    But issue summary errors are of Drupal standards.
    (Updated the issue summary )

    Errors addressed by patch#10:

    phpcs --standard=DrupalPractice --extensions=php,module,inc,in
    stall,test,profile,theme,css,js,info,txt,md,yml,twig

    FILE: /home/specbee/contribution/drupal/drupal/modules/contrib/dismissible_message_bar/notifications_entity.page.inc
    --------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
    24 | WARNING | Unused variable $notifications_entity.
    --------------------------------------------------------------------------------------------------------------------

    FILE: /home/specbee/contribution/drupal/drupal/modules/contrib/dismissible_message_bar/dmb_notifications_entity.page.inc
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------
    24 | WARNING | Unused variable $notifications_entity.
    ------------------------------------------------------------------------------------------------------------------------

    FILE: /home/specbee/contribution/drupal/drupal/modules/contrib/dismissible_message_bar/src/Service/DmbNotificationService.php
    ------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------------------
    498 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
    | | $stack->getCurrentRequest()->cookies->get('dismissible_message_bar') instead
    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    FILE: /home/specbee/contribution/drupal/drupal/modules/contrib/dismissible_message_bar/src/Form/DmbNotificationsEntityForm.php
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------
    22 | WARNING | Unused variable $entity.
    ------------------------------------------------------------------------------------------------------------------------------

    FILE: /home/specbee/contribution/drupal/drupal/modules/contrib/dismissible_message_bar/src/Entity/DmbNotificationsEntityInterface.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------
    16 | WARNING | There must be no blank line following an inline comment
    -------------------------------------------------------------------------------------------------

    Pending issues as of branch: 8.x-1.x
    js/dismissible_message_bar.js - Drupal standard issues.

  • 🇺🇸United States Mojiferous

    Sorry, there are a lot of changes upstream for Drupal 10 and this issue will remain closed.

Production build 0.69.0 2024