Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/views_vcards/tests/modules/views_vcards_test/views_vcards_test.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/views_vcards/src/Plugin/views/row/ViewsVcardsRowPluginVcard.php
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
463 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/views_vcards/src/Plugin/views/display/ViewsVcardsDisplayPluginVcard.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
205 | WARNING | Unused variable $row_index.
329 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

Time: 3.29 secs; Memory: 8MB

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

Proposed resolution

Above error/warnings need to be fixed.

CommentFileSizeAuthor
#2 3346411-2.patch2.12 KBsamitk
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.12 KB

Above error/warnings are fixed.

hardikpandya’s picture

Status: Needs review » Reviewed & tested by the community

The patch resolves all phpcs issues. Marking RTBC!

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

neograph734’s picture

Version: 3.0.1 » 3.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -, -, -Coding standards

Committed. Thanks!

Status: Fixed » Closed (fixed)

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