Resolve PHP CodeSniffer Issues

Created on 14 June 2023, over 1 year ago
Updated 2 September 2024, 3 months ago

Problem/Motivation

FILE: /var/www/html/drupal9_test/code/modules/contrib/views_bulk_edit/src/Form/BulkEditFormTrait.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------
272 | ERROR | [x] Use null coalesce operator instead of ternary operator.
420 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
420 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal9_test/code/modules/contrib/views_bulk_edit/tests/src/Kernel/ViewsBulkEditActionTest.php
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------
65 | WARNING | Unused variable $results.
69 | WARNING | Unused variable $statuses.
------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupal9_test/code/modules/contrib/views_bulk_edit/tests/src/Functional/ViewsBulkEditModifyEntityValuesTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
131 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇮🇳India yashmalviya

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024