Drupal Coding Standards Issues | phpcs

Created on 3 February 2023, over 1 year ago
Updated 16 February 2024, 5 months ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/tocify/src/Plugin/Block/TableOfContents.php
--------------------------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 24 LINES
--------------------------------------------------------------------------------------------------------------------
  78 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  87 | ERROR | [x] Use null coalesce operator instead of ternary operator.
  96 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 105 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 112 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 121 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 130 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 139 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 148 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 155 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 164 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 173 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 180 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 187 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 196 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 203 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 212 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 219 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 228 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 235 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 244 | ERROR | [x] Use null coalesce operator instead of ternary operator.
 309 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
 310 | ERROR | [x] Expected 1 blank line after function; 0 found
 311 | ERROR | [x] The closing brace for the class must have an empty line before it
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/tocify/src/Commands/TocifyCommands.php
---------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
  56 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  61 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  72 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 163 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------

Time: 142ms; Memory: 12MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India sahil.goyal

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024