Drupal Coding Standards Issues | phpcs

Created on 20 January 2023, almost 2 years ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal twitter_filter

FILE: ...sers\Admin\Desktop\task\twitter_filter\src\Plugin\Filter\TwitterFilter.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 46 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 66 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...ers\Admin\Desktop\task\twitter_filter\tests\src\Unit\TwitterFilterTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 434ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

🇮🇳India Jay Jangid

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • Status changed to Closed: cannot reproduce almost 2 years ago
Production build 0.71.5 2024