Drupal Coding Standards Issues | phpcs

Created on 19 January 2023, over 1 year ago
Updated 19 May 2023, about 1 year ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal button_link

FILE: ...p\task\button_link\src\Plugin\Field\FieldFormatter\ButtonLinkFormatter.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
  45 | ERROR   | [x] Missing function doc comment
 114 | ERROR   | [x] Missing function doc comment
 147 | ERROR   | [x] Short array syntax must be used to define arrays
 165 | WARNING | [ ] Only string literals should be passed to t() where
     |         |     possible
 181 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 501ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

Fixed

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.

Production build 0.69.0 2024