Fix the issues reported by PHP_CodeSniffer

Created on 20 September 2024, 7 months ago

Problem/Motivation

FILE: modules\contextual_views\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
28 | WARNING | Line exceeds 80 characters; contains 81 characters
31 | WARNING | Line exceeds 80 characters; contains 86 characters
34 | WARNING | Line exceeds 80 characters; contains 84 characters
38 | WARNING | Line exceeds 80 characters; contains 129 characters
----------------------------------------------------------------------

FILE: modules\contextual_views\src\Plugin\views\display\ContextualBlock.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------------------
81 | WARNING | [x] There must be no blank line following an inline comment
81 | WARNING | [x] '@todo: Generate form based upon Views context.' should match the format '@todo Fix problem X here.'
94 | ERROR | [x] Use null coalesce operator instead of ternary operator.
110 | ERROR | [x] Use null coalesce operator instead of ternary operator.
189 | ERROR | [x] list(...) is forbidden, use [...] instead.
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

📌 Task
Status

Needs review

Version

1.2

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024