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/
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3357864-errors-fixed.png | 12.23 KB | clarkssquared |
| #5 | 3357864-PatchApplied.png | 61.74 KB | clarkssquared |
| #5 | 3357864-PHPCS-ERRORS.png | 521.97 KB | clarkssquared |
| #3 | PHPCS.png | 45.04 KB | nishant |
| #3 | Fixtheissuesreportedbyphpcs-3357864-2.patch | 4.96 KB | nishant |
Issue fork notificationswidget-3357864
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nishantCreated patch, Please review
Comment #4
nishantComment #5
clarkssquared commentedHi Nishant,
I applied your patch #3 into the Notifications widget module against version 2.0.x-dev and confirmed that PHPCS errors were fixed.
Please look at the screenshots attached for your reference
Thank you.
Comment #7
o_timoshchuk commentedFixed code style
Comment #8
bramdriesenMR is ok
Comment #9
bramdriesenComment #10
bramdriesen