Problem/Motivation

Getting following errors.

FILE: /var/www/html/modules/contrib/menu_pager/src/Plugin/Block/MenuBlock.php
-----------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------
108 | ERROR | [x] Use null coalesce operator instead of ternary operator.
115 | ERROR | [x] Use null coalesce operator instead of ternary operator.
122 | ERROR | [x] Use null coalesce operator instead of ternary operator.
132 | ERROR | [x] Use null coalesce operator instead of ternary operator.
146 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

Time: 2.35 secs; Memory: 6MB

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/menu_pager/

Proposed resolution

Above errors need to be fixed.

Issue fork menu_pager-3356373

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
new2.7 KB

Above errors has been fixed.

clarkssquared’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new128.03 KB
new52.5 KB

Hi samit.310@gmail.com,

I applied your patch #2 to the "Menu Pager" module against version 3.x-dev, and verified that the PHPCS issues were resolved.

Please look at the screenshot attached for your reference.

Thank you.

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

balajidharma’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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