Fix the issues reported by phpcs

Created on 3 May 2023, over 1 year ago
Updated 8 May 2023, over 1 year ago

Problem/Motivation

FILE: /notificationswidget/notifications_widget.install
-------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------------
161 | ERROR | [x] Whitespace found at end of line
310 | ERROR | [x] Whitespace found at end of line
319 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: /notificationswidget/js/notifications.js
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
36 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
58 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------

FILE: /notificationswidget/src/Plugin/Block/NotificationsWidgetBlock.php
------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------
84 | ERROR | [x] Use null coalesce operator instead of ternary operator.
90 | ERROR | [x] Use null coalesce operator instead of ternary operator.
134 | ERROR | [x] Use null coalesce operator instead of ternary operator.
179 | ERROR | [x] Use null coalesce operator instead of ternary operator.
180 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE:/notificationswidget/src/Form/NotificationsWidgetSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
343 | ERROR | [x] Object operator not indented correctly; expected 15 spaces but found 14
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

FILE: /notificationswidget/src/Services/NotificationsWidgetServiceInterface.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
21 | ERROR | [x] Parameter comment must end with a full stop
24 | ERROR | [x] Parameter comment must end with a full stop
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY

Steps to reproduce

vendor/bin/phpcbf --standard="Drupal,DrupalPractice" -n --extensions="php,module,inc,install,test,profile,theme,info,js" notificationswidget/

๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Nishant

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

Production build 0.71.5 2024