Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/paragraph_view_mode/paragraph_view_mode.module
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------
67 | WARNING | Only string literals should be passed to t() where possible
----------------------------------------------------------------------------

FILE: /app/modules/contrib/paragraph_view_mode/src/Plugin/Field/FieldWidget/ParagraphViewModeWidget.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
144 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/paragraph_view_mode/src/StorageManager.php
-----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------
197 | WARNING | Only string literals should be passed to t() where possible
-----------------------------------------------------------------------------

FILE: /app/modules/contrib/paragraph_view_mode/src/StorageManagerInterface.php
-----------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------
28 | ERROR | [x] PHP keywords must be lowercase; expected "self" but found "SELF"
33 | ERROR | [x] PHP keywords must be lowercase; expected "self" but found "SELF"
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------

Time: 1.97 secs; Memory: 12MB

Steps to reproduce

Run following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/paragraph_view_mode/

Proposed resolution

Above error/warnings need to be fixed

CommentFileSizeAuthor
#2 3329744-2.patch2.47 KBsamitk

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.47 KB

Error/warnings are fixed.

sayco’s picture

Status: Needs review » Fixed
sayco’s picture

Thank you for improving the coding standards! I've merged the patch to the dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.