Problem/Motivation

Getting following error/warnings

FILE: /app/modules/contrib/vbo_export/src/Plugin/Action/VboExportBase.php
-----------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-----------------------------------------------------------------------------
114 | ERROR | [x] Use null coalesce operator instead of ternary operator.
120 | ERROR | [x] Use null coalesce operator instead of ternary operator.
150 | ERROR | [x] Use null coalesce operator instead of ternary operator.
156 | ERROR | [x] Use null coalesce operator instead of ternary operator.
200 | WARNING | [ ] Unused variable $rand.
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

FILE: /app/modules/contrib/vbo_export/src/Plugin/Action/VboExportCsv.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
35 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

FILE: /app/modules/contrib/vbo_export/src/Plugin/Action/VboExportPdf.php
--------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------------
15 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
31 | ERROR | [ ] Missing @var tag in member variable comment
81 | ERROR | [x] Use null coalesce operator instead of ternary operator.
90 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------

FILE: /app/modules/contrib/vbo_export/src/Plugin/Action/VboExportXlsx.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
65 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Time: 4.47 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/vbo_export/

Proposed resolution

Above error/warnings need to be fixed

CommentFileSizeAuthor
#2 3331193-2.patch5.17 KBsamitk

Issue fork vbo_export-3331193

Command icon 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

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

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.17 KB

Error/warnings are fixed.

charchil khandelwal’s picture

Issue tags: -, -

Patch #2 applied cleanly, and all errors and warnings are fixed.
Thanks

charchil khandelwal’s picture

Status: Needs review » Reviewed & tested by the community

I think everything is perfect now.
So moving it to RTBC.
Thanks

liam morland made their first commit to this issue’s fork.

liam morland’s picture

Version: 4.1.2 » 4.x-dev
Status: Reviewed & tested by the community » Needs review

All checks are passing.

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Version: 4.x-dev » 4.2.x-dev
Status: Needs review » Fixed

fixed in a new 4.2.x branch
thanks

Status: Fixed » Closed (fixed)

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

liam morland’s picture

I have created a merge request with additional coding standards fixes. Tests are fully passing.

I suggest dropping support for Drupal 9 in 4.2.x.