Created on 20 March 2023, over 1 year ago

Problem/Motivation

There are a bunch of errors reported by PHPCS. It would be nice to get the fixed.

  FILE: /viewsreference/CHANGELOG.md
  -------------------------------------------------------------------------------------------
  FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
  -------------------------------------------------------------------------------------------
  3 | WARNING | Line exceeds 80 characters; contains 84 characters
  47 | WARNING | Line exceeds 80 characters; contains 92 characters
  -------------------------------------------------------------------------------------------


  FILE: /viewsreference/README.md
  ----------------------------------------------------------------------------------------
  FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
  ----------------------------------------------------------------------------------------
  6 | WARNING | Line exceeds 80 characters; contains 118 characters
  7 | WARNING | Line exceeds 80 characters; contains 104 characters
  20 | WARNING | Line exceeds 80 characters; contains 102 characters
  32 | WARNING | Line exceeds 80 characters; contains 98 characters
  33 | WARNING | Line exceeds 80 characters; contains 103 characters
  34 | WARNING | Line exceeds 80 characters; contains 153 characters
  ----------------------------------------------------------------------------------------


  FILE: /viewsreference/viewsreference.module
  ------------------------------------------------------------------------------------------------------------------------------------------
  FOUND 5 ERRORS AFFECTING 5 LINES
  ------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  10 | ERROR | [x] When importing a class with "use", do not include a leading \
  11 | ERROR | [x] When importing a class with "use", do not include a leading \
  19 | ERROR | [ ] The array declaration extends to column 163 (the limit is 80). The array content should be split up over multiple lines
  79 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  ------------------------------------------------------------------------------------------------------------------------------------------
  PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
  ------------------------------------------------------------------------------------------------------------------------------------------


  FILE: /viewsreference/src/Plugin/Field/FieldWidget/ViewsReferenceTrait.php
  -----------------------------------------------------------------------------------------------------------------------------------
  FOUND 3 ERRORS AFFECTING 3 LINES
  -----------------------------------------------------------------------------------------------------------------------------------
  56 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  323 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
  405 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  -----------------------------------------------------------------------------------------------------------------------------------
  PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
  -----------------------------------------------------------------------------------------------------------------------------------


  FILE: /viewsreference/src/Plugin/Field/FieldWidget/ViewsReferenceWidget.php
  ------------------------------------------------------------------------------------------------------------------------------------
  FOUND 1 ERROR AFFECTING 1 LINE
  ------------------------------------------------------------------------------------------------------------------------------------
  39 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  ------------------------------------------------------------------------------------------------------------------------------------
  PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
  ------------------------------------------------------------------------------------------------------------------------------------


  FILE: /viewsreference/src/Plugin/Field/FieldType/ViewsReferenceItem.php
  --------------------------------------------------------------------------------------------------------------------------------
  FOUND 4 ERRORS AFFECTING 4 LINES
  --------------------------------------------------------------------------------------------------------------------------------
  93 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  112 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  113 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  114 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  --------------------------------------------------------------------------------------------------------------------------------
  PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
  --------------------------------------------------------------------------------------------------------------------------------


  FILE: /viewsreference/src/Plugin/Field/ViewsReferenceFieldItemList.php
  -------------------------------------------------------------------------------------------------------------------------------
  FOUND 1 ERROR AFFECTING 1 LINE
  -------------------------------------------------------------------------------------------------------------------------------
  69 | ERROR | Missing parameter type
  -------------------------------------------------------------------------------------------------------------------------------

  Time: 226ms; Memory: 12MB

Steps to reproduce

Run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml viewsreference with the coder module enabled.

Proposed resolution

Fix the errors.

Remaining tasks

User interface changes

-

API changes

-

Data model changes

-

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands seanB Netherlands

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

Comments & Activities

Production build 0.69.0 2024